aq

package
v0.0.0-...-972597a Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Unlicense Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidHeader   = Header{Off: -1, Len: -1}
	ErrFull         = errors.New("database is full")
	ErrInvalidValue = errors.New("empty value is not allowed")
)

Functions

This section is empty.

Types

type DB

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

func New

func New(filename string, size int) (*DB, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) Flush

func (db *DB) Flush() error

func (*DB) Iterate

func (db *DB) Iterate() Iterator

func (*DB) Read

func (db *DB) Read(hdr Header) ([]byte, error)

func (*DB) Write

func (db *DB) Write(data []byte) (Header, error)
type Header struct {
	Off int32
	Len int32
}

type Iterator

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

func (*Iterator) Bytes

func (it *Iterator) Bytes() []byte

func (*Iterator) Next

func (it *Iterator) Next() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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