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)
Click to show internal directories.
Click to hide internal directories.