queue

package
v0.0.0-...-ab939ae Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockQueue

type BlockQueue[V any] interface {
	Queue[V]
	Shutdown()
	IsShutdown() bool
}

func NewBlockQueue

func NewBlockQueue[V any](constraint HeapConstraint[V]) BlockQueue[V]

type DelayingQueue

type DelayingQueue[V any] interface {
	BlockQueue[V]
	AddAfter(value V, duration time.Duration)
	Refresh(obj V) error
}

func NewDelayingQueue

func NewDelayingQueue[V any](constraint HeapConstraint[V]) DelayingQueue[V]

type HeapConstraint

type HeapConstraint[VALUE any] interface {
	heap.Constraint[string, VALUE]
}

type Queue

type Queue[V any] interface {
	Add(value V)
	Update(value V) error
	Delete(value V) error
	Get(value V) (V, bool)
	Pop() (V, error)
	Peek() (V, error)
	List() []V
	Len() int
}

Jump to

Keyboard shortcuts

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