ringbuffer

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 2 Imported by: 2

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