queue

package module
v0.0.0-...-4443dcc Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 4 Imported by: 0

README

queue

go priority queue

Usage

see /_examples/priority/main.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item interface {
	Identify() string
	Value() int // get priority of Item
}

type Queue

type Queue interface {
	Enqueue(i Item) error

	Dequeue() Item

	DequeueSync() Item

	Length() int

	Peek() Item

	Range(f func(key, value interface{}) bool)
}

func NewQueue

func NewQueue(maxQueueLength int) Queue

Directories

Path Synopsis
_examples
priority command

Jump to

Keyboard shortcuts

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