queue

package
v0.0.0-...-57c47fe Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FIFO

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

func NewFIFO

func NewFIFO[T any]() *FIFO[T]

func (*FIFO[T]) Consume

func (fifo *FIFO[T]) Consume() <-chan T

func (*FIFO[T]) DoneProducing

func (fifo *FIFO[T]) DoneProducing()

func (*FIFO[T]) Produce

func (fifo *FIFO[T]) Produce() chan<- T

func (*FIFO[T]) Push

func (fifo *FIFO[T]) Push(elem T)

type Ring

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

func NewRing

func NewRing[T any](size int64) *Ring[T]

func (*Ring[T]) Empty

func (q *Ring[T]) Empty() bool

func (*Ring[T]) Length

func (q *Ring[T]) Length() int64

func (*Ring[T]) Peek

func (q *Ring[T]) Peek() T

func (*Ring[T]) Pop

func (q *Ring[T]) Pop() (T, bool)

func (*Ring[T]) PopMany

func (q *Ring[T]) PopMany(count int64) []T

func (*Ring[T]) Push

func (q *Ring[T]) Push(item T)

Jump to

Keyboard shortcuts

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