queue_full

package
v0.0.0-...-d724b4b Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMaxQueueSizeReached = errors.New("queue: maximum queue size reached")

ErrMaxQueueSizeReached is returned when the max queue size has been reached.

Functions

This section is empty.

Types

type Queue

type Queue struct {
	MaxSize int
	Data    []interface{}
	// contains filtered or unexported fields
}

Queue of items.

func New

func New(maxSize int) *Queue

New creates a new queue.

func (*Queue) Dequeue

func (q *Queue) Dequeue() (d interface{}, ok bool)

Dequeue an item.

func (*Queue) Enqueue

func (q *Queue) Enqueue(d interface{}) (err error)

Enqueue an item.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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