btree

package
v0.0.0-...-21c8821 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tree

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

func NewTree

func NewTree(getNodeCB func(uint64) []byte, newNodeCB func([]byte) uint64, delNodeCB func(uint64)) Tree

func (*Tree) DebugGetNode

func (tree *Tree) DebugGetNode(ptr uint64) []byte

func (*Tree) Delete

func (tree *Tree) Delete(key []byte) bool

Delete deletes a key and returns whether the key was there

func (*Tree) Get

func (tree *Tree) Get(key []byte) ([]byte, bool)

Get value by key

func (*Tree) Insert

func (tree *Tree) Insert(key []byte, val []byte)

func (*Tree) NewTreeCursor

func (tree *Tree) NewTreeCursor() *TreeCursor

func (*Tree) Root

func (tree *Tree) Root() uint64

func (*Tree) SetRoot

func (tree *Tree) SetRoot(in uint64)

type TreeCursor

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

func (*TreeCursor) Key

func (c *TreeCursor) Key() []byte

func (*TreeCursor) Next

func (c *TreeCursor) Next() ([]byte, []byte)

func (*TreeCursor) Seek

func (c *TreeCursor) Seek(key []byte) ([]byte, []byte)

func (*TreeCursor) SeekToFirst

func (c *TreeCursor) SeekToFirst() ([]byte, []byte)

func (*TreeCursor) Value

func (c *TreeCursor) Value() []byte

Jump to

Keyboard shortcuts

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