testqueue

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

Queue is a threadsafe FIFO queue implementing storage.Queue

func New

func New() *Queue

New returns a queue suitable for testing

func (*Queue) Close

func (q *Queue) Close() error

Close closes the queue

func (*Queue) Dequeue

func (q *Queue) Dequeue() (storage.Value, error)

Dequeue removes a FIFO element

func (*Queue) Enqueue

func (q *Queue) Enqueue(value storage.Value) error

Enqueue add a FIFO element

func (*Queue) Peekqueue

func (q *Queue) Peekqueue(limit int) ([]storage.Value, error)

Peekqueue gets upto 'limit' entries from the list queue

Jump to

Keyboard shortcuts

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