ring

package
v0.0.0-...-6deb688 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyQueue = errors.New("queue is empty")

Functions

This section is empty.

Types

type Queue

type Queue[T any] struct {
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue[T any]() *Queue[T]

func NewQueueWithCapacity

func NewQueueWithCapacity[T any](capacity int) *Queue[T]

func (*Queue[T]) Count

func (queue *Queue[T]) Count() int

func (*Queue[T]) Dequeue

func (queue *Queue[T]) Dequeue() error

func (*Queue[T]) Enqueue

func (queue *Queue[T]) Enqueue(value T)

func (*Queue[T]) Peek

func (queue *Queue[T]) Peek() (T, error)

Jump to

Keyboard shortcuts

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