queue

package
Version: v0.0.0-...-a69e935 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.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 DequeueTimeOutError

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

DequeueTimeOutError represents the error that the dequeue max wait time expired.

func (DequeueTimeOutError) Error

func (d DequeueTimeOutError) Error() string

type Queue

type Queue interface {
	GetName() string
	GetItemType() reflect.Type
	Enqueue(item interface{}) error
	Dequeue(maxWaitTime time.Duration) (interface{}, error)
	Length() int
}

Queue defines the interface of an item queue

func NewQueue

func NewQueue(name string, itemType reflect.Type, maxQueueSize uint32) Queue

NewQueue creates a new in-memory queue instance

Source Files

Jump to

Keyboard shortcuts

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