rtree

package module
v0.0.0-...-c018458 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

README

radix-tree

radix tree

Documentation

Index

Constants

View Source
const (
	PushKey = '='
	Push    = '+'
	Pop     = '-'
)

Variables

View Source
var DefaultFreeListSize = 32
View Source
var Empty = []byte{'e', 'm', 'p', 't', 'y'}

Functions

This section is empty.

Types

type FreeList

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

func NewFreeList

func NewFreeList(size int) *FreeList

type Tree

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

func New

func New() *Tree

func ReBuildTree

func ReBuildTree(reader io.Reader, unMarshal func(data []byte) (interface{}, error)) (*Tree, error)

func ReBuildTreeWithGzip

func ReBuildTreeWithGzip(reader io.Reader, unMarshal func(data []byte) (interface{}, error)) (*Tree, error)

func (*Tree) Clone

func (tree *Tree) Clone() *Tree

func (*Tree) Delete

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

func (*Tree) Find

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

func (*Tree) Insert

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

func (*Tree) ReplaceOrInsert

func (tree *Tree) ReplaceOrInsert(key []byte, val interface{}) interface{}

func (Tree) Walk

func (tree Tree) Walk(f func(prefixes [][]byte, val interface{}) bool)

func (Tree) WalkWithPrefix

func (tree Tree) WalkWithPrefix(prefix []byte, f func(prefixes [][]byte, val interface{}) bool)

func (*Tree) WriteTo

func (tree *Tree) WriteTo(writer io.Writer, marshaler func(interface{}) ([]byte, error)) (int64, error)

func (*Tree) WriteToWithGzip

func (tree *Tree) WriteToWithGzip(writer io.Writer, marshaler func(interface{}) ([]byte, error)) (int64, error)

Jump to

Keyboard shortcuts

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