Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBufferFull = errors.New("the ring buffer is full") ErrBufferEmpty = errors.New("the ring buffer is empty") )
Functions ¶
This section is empty.
Types ¶
type RingBuffer ¶
type RingBuffer struct {
// contains filtered or unexported fields
}
func NewRingBuffer ¶
func NewRingBuffer(size int64) *RingBuffer
func (*RingBuffer) Dequeue ¶
func (rb *RingBuffer) Dequeue() (any, error)
func (*RingBuffer) Enqueue ¶
func (rb *RingBuffer) Enqueue(item any) error
func (*RingBuffer) IsEmpty ¶
func (rb *RingBuffer) IsEmpty(val int64) bool
func (*RingBuffer) IsFull ¶
func (rb *RingBuffer) IsFull(val int64) bool
Click to show internal directories.
Click to hide internal directories.