Documentation
¶
Index ¶
- Variables
- type Pair
- type Tree
- func (t *Tree) Delete(key, value []byte) bool
- func (t *Tree) EncodeNodePages() (TreePageHeader, [][]byte, error)
- func (t *Tree) Get(key []byte) [][]byte
- func (t *Tree) Insert(key, value []byte) bool
- func (t *Tree) Len() int
- func (t *Tree) MarshalBinary() ([]byte, error)
- func (t *Tree) Scan(start, end []byte, includeEnd bool) []Pair
- type TreePageHeader
Constants ¶
This section is empty.
Variables ¶
var ErrCorrupt = errors.New("meldbase index: corrupt tree")
ErrCorrupt reports malformed or inconsistent tree data.
Functions ¶
This section is empty.
Types ¶
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree stores sorted byte keys with one or more distinct byte values per key.
func DecodeNodePages ¶
func DecodeNodePages(header TreePageHeader, encoded [][]byte) (*Tree, error)
DecodeNodePages reconstructs and validates a tree from individually encoded nodes.
func NewWithOrder ¶
NewWithOrder creates an empty tree with at least three keys allowed per node.
func (*Tree) EncodeNodePages ¶
func (t *Tree) EncodeNodePages() (TreePageHeader, [][]byte, error)
EncodeNodePages encodes each tree node as a separate blob with stable node IDs.
The checkpoint catalog resolves child and leaf-next links by those IDs.
func (*Tree) MarshalBinary ¶
MarshalBinary encodes the tree while preserving its node structure.
type TreePageHeader ¶
TreePageHeader records the root, node capacity, and pair count for encoded node pages.