inMemoryQueue

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmpty is returned when the stack or queue is empty.
	ErrEmpty = errors.New("inMemoryQueue.go: queue is empty")
)

Functions

This section is empty.

Types

type ConcurrentQueue

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

ConcurrentQueue concurrent queue

func NewConcurrentQueue

func NewConcurrentQueue(maxLength int) *ConcurrentQueue

func (*ConcurrentQueue) Close

func (c *ConcurrentQueue) Close() error

func (*ConcurrentQueue) Dequeue

func (c *ConcurrentQueue) Dequeue() (*Item, error)

func (*ConcurrentQueue) Enqueue

func (c *ConcurrentQueue) Enqueue(data []byte) (*Item, error)

func (*ConcurrentQueue) IsFull

func (c *ConcurrentQueue) IsFull() bool

func (*ConcurrentQueue) Length

func (c *ConcurrentQueue) Length() uint64

type Item

type Item = queue.Item

Jump to

Keyboard shortcuts

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