pq

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Done = errors.New("no more items in iterator")

Done indicates an iterator has returned all items. https://github.com/GoogleCloudPlatform/google-cloud-go/wiki/Iterator-Guidelines

Functions

This section is empty.

Types

type Element

type Element[K any, V any, CTX any] struct {
	// contains filtered or unexported fields
}

type IteratorWithContext

type IteratorWithContext[K any, V any, CTX any] interface {
	// Next returns the next key, value in sequence.
	// Returns Done as the error when the iterator is exhausted.
	Next() (K, V, error)
	// Context returns the context to identify the given iterator.
	Context() CTX
}

type PriorityQueue

type PriorityQueue[K any, V any, CTX any] struct {
	// contains filtered or unexported fields
}

func (*PriorityQueue[K, V, CTX]) Next

func (pq *PriorityQueue[K, V, CTX]) Next() (_ K, _ V, _ CTX, err error)

type PriorityQueueI

type PriorityQueueI[K any, V any, CTX any] interface {
	// Next returns the next key, value and context in sequence.
	// Returns Done as the error when the iterator is exhausted.
	Next() (K, V, CTX, error)
}

func NewPriorityQueue

func NewPriorityQueue[K any, V any, CTX any](comp skiplist.Comparator[K], iterators []IteratorWithContext[K, V, CTX]) (PriorityQueueI[K, V, CTX], error)

Jump to

Keyboard shortcuts

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