Documentation ¶
Index ¶
- func BytesToUint64Slice(b []byte) []uint64
- type Tree
- func (t *Tree) Bytes() []byte
- func (t *Tree) Close() error
- func (t *Tree) DeleteBelow(ts uint64)
- func (t *Tree) Get(k uint64) uint64
- func (t *Tree) Iterate(fn func(node))
- func (t *Tree) IterateKV(f func(key, val uint64) (newVal uint64))
- func (t *Tree) Print()
- func (t *Tree) Reset()
- func (t *Tree) Set(k, v uint64)
- func (t *Tree) Stats() TreeStats
- type TreeStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToUint64Slice ¶
BytesToUint64Slice converts a byte slice to a uint64 slice.
Types ¶
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree represents the structure for custom mmaped B+ tree. It supports keys in range [1, math.MaxUint64-1] and values [1, math.Uint64].
func FromBuffer ¶ added in v1.8.0
func (*Tree) DeleteBelow ¶
DeleteBelow deletes all keys with value under ts.
func (*Tree) Get ¶
Get looks for key and returns the corresponding value. If key is not found, 0 is returned.
func (*Tree) Iterate ¶
func (t *Tree) Iterate(fn func(node))
Iterate iterates over the tree and executes the fn on each node.
Click to show internal directories.
Click to hide internal directories.