trie

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSkipResolver = errors.New("skip resolve domain")
View Source
var SkipResolver = netapi.ErrorResolver(func(domain string) error { return ErrSkipResolver })

Functions

This section is empty.

Types

type Trie

type Trie[T any] struct {
	// contains filtered or unexported fields
}

func NewTrie

func NewTrie[T any]() *Trie[T]

func (*Trie[T]) Clear

func (x *Trie[T]) Clear() error

func (*Trie[T]) Insert

func (x *Trie[T]) Insert(str string, mark T)

func (*Trie[T]) Remove

func (x *Trie[T]) Remove(str string)

func (*Trie[T]) Search

func (x *Trie[T]) Search(ctx context.Context, addr netapi.Address) (mark T, ok bool)

func (*Trie[T]) SearchWithDefault

func (x *Trie[T]) SearchWithDefault(ctx context.Context, addr netapi.Address, defaultT T) T

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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