ringbuffer

package
v0.0.0-...-dd34702 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RingBuffer

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

func New

func New[T any](size int64) *RingBuffer[T]

func (*RingBuffer[T]) Len

func (rb *RingBuffer[T]) Len() int64

func (*RingBuffer[T]) Pop

func (rb *RingBuffer[T]) Pop() (T, bool)

func (*RingBuffer[T]) PopN

func (rb *RingBuffer[T]) PopN(n int64) ([]T, bool)

func (*RingBuffer[T]) Push

func (rb *RingBuffer[T]) Push(item T)

Jump to

Keyboard shortcuts

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