queue

package
v0.0.0-...-62cb2ec Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: BSD-3-Clause Imports: 2 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 basic FIFO queue for Messages.

func NewQueue

func NewQueue(maxSize int) *Queue

NewQueue returns a new Queue. If maxSize is greater than zero the queue will not grow more than the defined size.

func (*Queue) All

func (q *Queue) All() []*av.Packet

All returns and removes all messages from the queue.

func (*Queue) Len

func (q *Queue) Len() int

Len returns the length of the queue.

func (*Queue) Pop

func (q *Queue) Pop() *av.Packet

Pop removes and returns a message from the queue in first to last order.

func (*Queue) Push

func (q *Queue) Push(msg *av.Packet)

Push adds a message to the queue.

Jump to

Keyboard shortcuts

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