buf

package
v1.48.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RingBuffer

type RingBuffer struct {
	// contains filtered or unexported fields
}

RingBuffer represents synchronized ring implementation

func New

func New(size int) *RingBuffer

New creates new RingBuffer

func (*RingBuffer) Add

func (buf *RingBuffer) Add(v interface{})

Add adds item to ring

func (*RingBuffer) Do

func (buf *RingBuffer) Do(f func(interface{}))

Do executes provided callback on all non-nil items of a ring

func (*RingBuffer) Last

func (buf *RingBuffer) Last() interface{}

Last returned last item added to the ring

Jump to

Keyboard shortcuts

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