storage

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBloomFilter

func BuildBloomFilter(path string) (*filter.BloomFilter, error)

bloom filter build

func ReadSegment

func ReadSegment(path string, out map[string]memtable.Entry) error

ReadSegment

func SearchSegment

func SearchSegment(path string, searchKey []byte) ([]byte, bool, bool)

func WriteSegment

func WriteSegment(path string, data map[string]memtable.Entry) error

WriteSegment takes the in-memory data and stores it in the dense segment file format.

Types

type Segment

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

type WAL

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

func NewWAL

func NewWAL(path string) (*WAL, error)

WAL -> write - ahead - log file for the logs (this will be appended)

func (*WAL) Close

func (w *WAL) Close() error

close

func (*WAL) Recover

func (w *WAL) Recover(fn func(isDelete bool, key, val []byte)) error

func (*WAL) WriteEntry

func (w *WAL) WriteEntry(isDelete bool, key, value []byte) error

WriteEntry adds a new operation log to the WAL.

Jump to

Keyboard shortcuts

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