queue

package
v0.0.0-...-249e25c Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTransportClosed = errors.New("transport closed")

Functions

This section is empty.

Types

type Queue

type Queue interface {
	Write(e any) error
	Read() (any, error)
	Close() error
}

type Ring

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

Ring ...

func NewRing

func NewRing[T any](n int) (r Ring[T])

func (*Ring[T]) Cap

func (r *Ring[T]) Cap() int

Cap ...

func (*Ring[T]) Head

func (r *Ring[T]) Head() (v T, ok bool)

Head ...

func (*Ring[T]) Iterator

func (r *Ring[T]) Iterator() *RingIterator[T]

Iterator ...

func (*Ring[T]) Len

func (r *Ring[T]) Len() int

Len ...

func (*Ring[T]) Pop

func (r *Ring[T]) Pop() (v T, ok bool)

Pop ...

func (*Ring[T]) PopFront

func (r *Ring[T]) PopFront() (v T, ok bool)

PopFront ...

func (*Ring[T]) Push

func (r *Ring[T]) Push(v T)

Push ...

func (*Ring[T]) PushFront

func (r *Ring[T]) PushFront(v T)

PushFront ...

func (*Ring[T]) Resize

func (r *Ring[T]) Resize(n int)

Resize ...

func (*Ring[T]) Tail

func (r *Ring[T]) Tail() (v T, ok bool)

Tail ...

type RingIterator

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

RingIterator ...

func (*RingIterator[T]) Next

func (it *RingIterator[T]) Next() bool

Next ...

func (*RingIterator[T]) Ref

func (it *RingIterator[T]) Ref() *T

Ref ...

func (*RingIterator[T]) Value

func (it *RingIterator[T]) Value() T

Value ...

type Transport

type Transport interface {
	Open(name string) (Queue, error)
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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