internal

package
v0.0.0-...-fdda403 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2025 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchSizePerNumberOfQueries

func BatchSizePerNumberOfQueries(totalFilterLimit int, numberOfQueries int) int

BatchSizePerNumberOfQueries tries to make an educated guess for the batch size given the total filter limit and the number of abstract queries we'll be conducting at the same time

func ChooseNarrowestTag

func ChooseNarrowestTag(filter nostr.Filter) (key string, values []string, goodness int)

func CopyMapWithoutKey

func CopyMapWithoutKey[K comparable, V any](originalMap map[K]V, key K) map[K]V

func IsOlder

func IsOlder(previous, next *nostr.Event) bool

func SwapDelete

func SwapDelete[A any](arr []A, i int) []A

Types

type IterEvent

type IterEvent struct {
	*nostr.Event
	Q int
}

func MergeSortMultiple

func MergeSortMultiple(batches [][]IterEvent, limit int, dst []IterEvent) []IterEvent

MergeSortMultipleBatches takes the results of multiple iterators, which are already sorted, and merges them into a single big sorted slice

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL