Documentation
¶
Overview ¶
Package prque provides wrapper types for go-ethereum's prque implementation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LazyQueue ¶
type LazyQueue[P comparable, V any] struct { // contains filtered or unexported fields }
LazyQueue is a wrapper for go-ethereum's LazyQueue
func NewLazyQueue ¶
func NewLazyQueue[P comparable, V any](setIndexCallback func(data V, index int), priorityCallback func(data V) P, maxPriority func(data V, priority P) P, clock func() P, maxQueued int) *LazyQueue[P, V]
NewLazyQueue creates a new lazy queue - simplified version
type Prque ¶
type Prque[P comparable, V any] struct { // contains filtered or unexported fields }
Prque is a wrapper for go-ethereum's Prque
func New ¶
func New[P comparable, V any](setIndexCallback func(data V, index int)) *Prque[P, V]
New creates a new priority queue - simplified version
func (*Prque[P, V]) Peek ¶
func (p *Prque[P, V]) Peek() (V, P)
Peek returns the top item without removing it
func (*Prque[P, V]) Pop ¶
func (p *Prque[P, V]) Pop() (V, P)
Pop removes and returns the top item with its priority
Click to show internal directories.
Click to hide internal directories.