ring

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: Apache-2.0, 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 RingQueue

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

func NewRingQueue

func NewRingQueue[T any](capacity int64) *RingQueue[T]

func (*RingQueue[T]) IsFull

func (r *RingQueue[T]) IsFull() bool

func (*RingQueue[T]) Peek

func (r *RingQueue[T]) Peek() (T, error)

func (*RingQueue[T]) PeekIdx

func (r *RingQueue[T]) PeekIdx(idx int) (T, error)

func (*RingQueue[T]) PeekSlice

func (r *RingQueue[T]) PeekSlice(startIdx int) ([]T, error)

func (*RingQueue[T]) Pop

func (r *RingQueue[T]) Pop() (T, error)

func (*RingQueue[T]) Push

func (r *RingQueue[T]) Push(elem T) error

func (*RingQueue[T]) PushSafe

func (r *RingQueue[T]) PushSafe(elem T) error

func (*RingQueue[T]) Scan

func (r *RingQueue[T]) Scan(fn func(elem T, idx int) bool)

func (*RingQueue[T]) Size

func (r *RingQueue[T]) Size() int

func (*RingQueue[T]) String

func (r *RingQueue[T]) String() string

Jump to

Keyboard shortcuts

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