radix

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 3 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() *Tree

NewTree returns an empty Tree

func (*Tree) Get

func (t *Tree) Get(k string) (interface{}, bool)

func (*Tree) Insert

func (t *Tree) Insert(k string, v interface{}) bool

Insert is used to add/update a value to radix tree

func (*Tree) Walk

func (t *Tree) Walk(walker Walker)

type WalkState

type WalkState int
const (
	WalkIn WalkState = 1 << iota
	WalkOut
)

type WalkStatus

type WalkStatus int
const (
	WalkStop WalkStatus = iota + 1
	WalkContinue
)

type Walker

type Walker func(prefix string, v any, ws WalkState) WalkStatus

Jump to

Keyboard shortcuts

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