circular

package
v0.0.0-...-79eae96 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIsFull  = errors.New("circular buffer is full")
	ErrIsEmpty = errors.New("circular buffer is empty")
)

Functions

This section is empty.

Types

type Buffer

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

circular buffer

func NewBuffer

func NewBuffer(size int) *Buffer

func (*Buffer) Cap

func (b *Buffer) Cap() int

func (*Buffer) Empty

func (b *Buffer) Empty() bool

func (*Buffer) Full

func (b *Buffer) Full() bool

func (*Buffer) Read

func (b *Buffer) Read(data []byte) (n int, err error)

func (*Buffer) Reset

func (b *Buffer) Reset()

func (*Buffer) Write

func (b *Buffer) Write(data []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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