btree

package
v0.0.0-...-11d8ecd Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeLeaf

func DecodeLeaf(d []byte) (leafNode, error)

func DecodePointer

func DecodePointer(d []byte) (pointerNode, error)

Types

type BTree

type BTree struct {
	Root uint64
	// contains filtered or unexported fields
}

func New

func New(
	root uint64, pgSize int,
	get getFunc, pull pullFunc, alloc allocFunc, free freeFunc,
) BTree

func NewReadOnly

func NewReadOnly(root uint64, pgSize int, get getFunc) BTree

func (*BTree) Delete

func (bt *BTree) Delete(k []byte) (bool, error)

func (*BTree) Get

func (bt *BTree) Get(k []byte) ([]byte, error)

func (*BTree) Set

func (bt *BTree) Set(k, v []byte) (err error)

type Iterator

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

func (*Iterator) Next

func (iter *Iterator) Next() bool

func (*Iterator) Read

func (iter *Iterator) Read() (k []byte, v []byte)

Jump to

Keyboard shortcuts

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