Documentation ¶
Overview ¶
Package sort provides a generic iterator that merges multiple sorted iterators.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comparable ¶
type Comparable interface {
SortedField() []byte
}
Comparable is an interface that allows sorting of items.
type Iterator ¶
type Iterator[T Comparable] interface { Next() bool Val() T Close() error }
Iterator is a stream of items of Comparable type.
func NewItemIter ¶
func NewItemIter[T Comparable](iters []Iterator[T], desc bool) Iterator[T]
NewItemIter returns a new iterator that merges multiple sorted iterators.
Click to show internal directories.
Click to hide internal directories.