sort

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

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