Versions in this module Expand all Collapse all v0 v0.0.2 Nov 3, 2023 Changes in this version + const BranchPageElementSize + const BranchPageFlag + const BucketHeaderSize + const BucketLeafFlag + const DefaultAllocSize + const DefaultMaxBatchDelay + const DefaultMaxBatchSize + const ENV_VERIFY + const FreelistPageFlag + const IgnoreNoSync + const LeafPageElementSize + const LeafPageFlag + const Magic + const MaxMmapStep + const MetaPageFlag + const MinKeysPerPage + const PageHeaderSize + const Version + var DefaultPageSize = os.Getpagesize() + func Assert(condition bool, msg string, v ...any) + func CopyFile(srcPath, dstPath string) error + func DisableVerifications() func() + func EnableAllVerifications() func() + func EnableVerifications(verification VerificationType) func() + func IsVerificationEnabled(verification VerificationType) bool + func Mergepgids(dst, a, b Pgids) + func NewLeafPageElement(flags, pos, ksize, vsize uint32) *leafPageElement + func UnsafeAdd(base unsafe.Pointer, offset uintptr) unsafe.Pointer + func UnsafeByteSlice(base unsafe.Pointer, offset uintptr, i, j int) []byte + func UnsafeIndex(base unsafe.Pointer, offset uintptr, elemsz uintptr, n int) unsafe.Pointer + func UsedSpaceInPage(inodes Inodes, p *Page) uint32 + func Verify(f func()) + func WriteInodeToPage(inodes Inodes, p *Page) uint32 + type InBucket struct + func LoadBucket(buf []byte) *InBucket + func NewInBucket(root Pgid, seq uint64) InBucket + func (b *InBucket) InSequence() uint64 + func (b *InBucket) IncSequence() + func (b *InBucket) InlinePage(v []byte) *Page + func (b *InBucket) RootPage() Pgid + func (b *InBucket) SetInSequence(v uint64) + func (b *InBucket) SetRootPage(id Pgid) + func (b *InBucket) String() string + type Inode struct + func (in *Inode) Flags() uint32 + func (in *Inode) Key() []byte + func (in *Inode) Pgid() Pgid + func (in *Inode) SetFlags(flags uint32) + func (in *Inode) SetKey(key []byte) + func (in *Inode) SetPgid(id Pgid) + func (in *Inode) SetValue(value []byte) + func (in *Inode) Value() []byte + type Inodes []Inode + func ReadInodeFromPage(p *Page) Inodes + type Meta struct + func LoadPageMeta(buf []byte) *Meta + func (m *Meta) Checksum() uint64 + func (m *Meta) Copy(dest *Meta) + func (m *Meta) DecTxid() + func (m *Meta) Flags() uint32 + func (m *Meta) Freelist() Pgid + func (m *Meta) IncTxid() + func (m *Meta) IsFreelistPersisted() bool + func (m *Meta) Magic() uint32 + func (m *Meta) PageSize() uint32 + func (m *Meta) Pgid() Pgid + func (m *Meta) Print(w io.Writer) + func (m *Meta) RootBucket() *InBucket + func (m *Meta) SetChecksum(v uint64) + func (m *Meta) SetFlags(v uint32) + func (m *Meta) SetFreelist(v Pgid) + func (m *Meta) SetMagic(v uint32) + func (m *Meta) SetPageSize(v uint32) + func (m *Meta) SetPgid(id Pgid) + func (m *Meta) SetRootBucket(b InBucket) + func (m *Meta) SetTxid(id Txid) + func (m *Meta) SetVersion(v uint32) + func (m *Meta) Sum64() uint64 + func (m *Meta) Txid() Txid + func (m *Meta) Validate() error + func (m *Meta) Version() uint32 + func (m *Meta) Write(p *Page) + type Page struct + func LoadPage(buf []byte) *Page + func NewPage(id Pgid, flags, count uint16, overflow uint32) *Page + func (p *Page) BranchPageElement(index uint16) *branchPageElement + func (p *Page) BranchPageElements() []branchPageElement + func (p *Page) Count() uint16 + func (p *Page) FastCheck(id Pgid) + func (p *Page) Flags() uint16 + func (p *Page) FreelistPageCount() (int, int) + func (p *Page) FreelistPageIds() []Pgid + func (p *Page) Id() Pgid + func (p *Page) IsBranchPage() bool + func (p *Page) IsFreelistPage() bool + func (p *Page) IsLeafPage() bool + func (p *Page) IsMetaPage() bool + func (p *Page) LeafPageElement(index uint16) *leafPageElement + func (p *Page) LeafPageElements() []leafPageElement + func (p *Page) Meta() *Meta + func (p *Page) Overflow() uint32 + func (p *Page) PageElementSize() uintptr + func (p *Page) SetCount(target uint16) + func (p *Page) SetFlags(v uint16) + func (p *Page) SetId(target Pgid) + func (p *Page) SetOverflow(target uint32) + func (p *Page) String() string + func (p *Page) Typ() string + type PageInfo struct + Count int + ID int + OverflowCount int + Type string + type Pages []*Page + func (s Pages) Len() int + func (s Pages) Less(i, j int) bool + func (s Pages) Swap(i, j int) + type Pgid uint64 + const PgidNoFreelist + type Pgids []Pgid + func (a Pgids) Merge(b Pgids) Pgids + func (s Pgids) Len() int + func (s Pgids) Less(i, j int) bool + func (s Pgids) Swap(i, j int) + type Txid uint64 + type VerificationType string + const ENV_VERIFY_VALUE_ALL + const ENV_VERIFY_VALUE_ASSERT