queue

package
v0.0.0-...-ddc1a4a Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 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

Jump to

Keyboard shortcuts

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