Versions in this module Expand all Collapse all v0 v0.0.2 Dec 15, 2025 v0.0.1 Nov 25, 2025 Changes in this version + const DefaultMaxPackSize + const DefaultMaxTableLen + const EntriesPerPage + const ManifestFilename + const ManifestSize + const PackFileExt + const PageSize + const TableEntrySize + const TableFileExt + func Copy(srcLen uint32, srcTab Table, srcPack Pack, dstTab Table, dstPack Pack) (int, error) + func CreatePackFile(root *os.Root, gen uint32, maxSize uint32) (*os.File, error) + func CreateTableFile(shardRoot *os.Root, gen uint32, maxSize uint32) (*os.File, error) + func IsErrShardFull(err error) bool + func KeyCompare(a, b Key) int + func LoadPackFile(root *os.Root, gen uint32) (*os.File, error) + func LoadTableFile(shardRoot *os.Root, gen uint32) (*os.File, error) + func PackFilename(gen uint32) string + func SaveManifest(shardRoot *os.Root, manifest Manifest) error + func TableFilename(gen uint32) string + type Entry struct + Key Key + Len uint32 + Offset uint32 + func (ent *Entry) IsTombstone() bool + type ErrShardFull struct + func (e ErrShardFull) Error() string + type Key [3]uint64 + func KeyFromBytes(b []byte) Key + func (k Key) Bytes() []byte + func (k Key) Data() (ret [24]byte) + func (k Key) IsZero() bool + func (k Key) RotateAway(i int) Key + func (k Key) Uint64(i int) uint64 + func (k Key) Uint8(i int) uint8 + func (k Key) Uint8Len() int + type Manifest struct + Gen uint32 + Nonce uint64 + TableLen uint32 + func LoadManifest(shardRoot *os.Root) (Manifest, error) + type Pack struct + func NewPack(f *os.File, nextOffset uint32) (Pack, error) + func (pk *Pack) Append(data []byte) uint32 + func (pk *Pack) CanAppend(dataLen uint32) bool + func (pk *Pack) Flush() error + func (pk *Pack) Get(offset, length uint32, fn func(data []byte)) error + func (pk Pack) Close() error + func (pk Pack) FreeSpace() uint32 + type Shard struct + func New(rootDir *os.Root) *Shard + func (s *Shard) Close() error + func (s *Shard) HasSpace(dataLen int) bool + func (s *Shard) LocalAppend(key Key, data []byte) (bool, error) + func (s *Shard) LocalDelete(key Key) (bool, error) + func (sh *Shard) Flush() error + func (sh *Shard) Hydrate(maxTableSize, maxPackSize uint32) error + func (sh *Shard) LocalExists(key Key) bool + func (sh *Shard) LocalGet(key Key, fn func(data []byte)) (bool, error) + func (sh *Shard) TableLen() uint32 + type Table struct + func NewTable(f *os.File) (Table, error) + func (idx *Table) Close() error + func (idx *Table) Flush() error + func (idx *Table) SetSlot(slot uint32, ent Entry) + func (idx *Table) Slot(i uint32) (ret Entry) + func (idx *Table) SlotOffset(i uint32) uint32 + func (idx *Table) Tombstone(slot uint32) + func (idx Table) Capacity() uint32