buffer

package
v0.0.0-...-33668f2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

func New

func New[T any]() *Buffer[T]

func (*Buffer[T]) Close

func (b *Buffer[T]) Close()

func (*Buffer[T]) IsClosed

func (b *Buffer[T]) IsClosed() bool

func (*Buffer[T]) IsEmpty

func (b *Buffer[T]) IsEmpty() bool

func (*Buffer[T]) Pop

func (b *Buffer[T]) Pop() (T, bool)

func (*Buffer[T]) Push

func (b *Buffer[T]) Push(val T)

type Iterator

type Iterator[T any] struct {
	Buffer *Buffer[T]
	// contains filtered or unexported fields
}

func NewIterator

func NewIterator[T any](buffer *Buffer[T], nextChan chan<- *Iterator[T], closeChan chan<- *Iterator[T]) *Iterator[T]

func (*Iterator[T]) Close

func (iter *Iterator[T]) Close() error

func (*Iterator[T]) End

func (iter *Iterator[T]) End()

func (*Iterator[T]) Err

func (iter *Iterator[T]) Err() error

func (*Iterator[T]) Get

func (iter *Iterator[T]) Get() (T, error)

func (*Iterator[T]) Next

func (iter *Iterator[T]) Next() bool

func (*Iterator[T]) SendErr

func (iter *Iterator[T]) SendErr(err error)

func (*Iterator[T]) SendItem

func (iter *Iterator[T]) SendItem(val T)

Jump to

Keyboard shortcuts

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