buffer

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch added in v0.2.0

type Batch struct {
	Day     time.Time
	Raw     []byte
	Data    []byte
	Indexes []Index
	Entries uint32
	Time    [2]uint32
}

type Buffer

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

func New

func New(maxEntries int, c *codec.Codec) *Buffer

func (*Buffer) Add

func (b *Buffer) Add(day time.Time, entry codec.LogEntry) error

func (*Buffer) Bytes added in v0.2.0

func (b *Buffer) Bytes() int

func (*Buffer) Day added in v0.2.0

func (b *Buffer) Day() time.Time

func (*Buffer) Size

func (b *Buffer) Size() int

func (*Buffer) Snapshot added in v0.2.0

func (b *Buffer) Snapshot() (time.Time, []byte, uint32)

func (*Buffer) Take added in v0.2.0

func (b *Buffer) Take() (*Batch, error)

type Index

type Index struct {
	Actor uint32
	Data  []byte
}

Jump to

Keyboard shortcuts

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