Help us shape the future of Go! Take the 2026 Go Developer Survey

queue

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: GPL-3.0 Imports: 4 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[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](capacity uint64) *Queue[T]

New creates a first in first out New with max capacity of 65535.

func (*Queue[T]) Close

func (queue *Queue[T]) Close()

func (*Queue[T]) Flush

func (queue *Queue[T]) Flush() monad.Result[[]T]

func (*Queue[T]) ForEach

func (queue *Queue[T]) ForEach(ctx context.Context, loop func(index int, value T))

func (*Queue[T]) ForN

func (queue *Queue[T]) ForN(n uint64, loop func(index int, value T))

func (*Queue[T]) IsClosed

func (queue *Queue[T]) IsClosed() bool

func (*Queue[T]) IsEmpty

func (queue *Queue[T]) IsEmpty() bool

func (*Queue[T]) Length

func (queue *Queue[T]) Length() uint64

func (*Queue[T]) MustPull

func (queue *Queue[T]) MustPull() monad.Maybe[T]

func (*Queue[T]) MustPush

func (queue *Queue[T]) MustPush(value T) monad.Result[bool]

func (*Queue[T]) Peek

func (queue *Queue[T]) Peek() monad.Maybe[T]

func (*Queue[T]) Pull

func (queue *Queue[T]) Pull() monad.Result[T]

func (*Queue[T]) Push

func (queue *Queue[T]) Push(value T) monad.Maybe[error]

func (*Queue[T]) String

func (queue *Queue[T]) String() string

type QueueClosedError

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

func NewQueueClosedError

func NewQueueClosedError() *QueueClosedError

Jump to

Keyboard shortcuts

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