addrtrie

package module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 5 Imported by: 1

README

Address Trie

Domain name trie and IPv4/IPv6 address trie.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainMatcher

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

func NewDomainMatcher

func NewDomainMatcher[T any]() *DomainMatcher[T]

func (*DomainMatcher[T]) Add

func (m *DomainMatcher[T]) Add(pattern string, value T) error

func (*DomainMatcher[T]) Find

func (m *DomainMatcher[T]) Find(domain string) (matched T, exists bool)

type IPv4Trie added in v0.3.0

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

func NewIPv4Trie added in v0.3.0

func NewIPv4Trie[T any]() *IPv4Trie[T]

func (*IPv4Trie[T]) Find added in v0.3.0

func (t *IPv4Trie[T]) Find(ipStr string) (matched T, exists bool)

func (*IPv4Trie[T]) Insert added in v0.3.0

func (t *IPv4Trie[T]) Insert(prefix string, value T) error

type IPv6Trie added in v0.3.0

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

func NewIPv6Trie added in v0.3.0

func NewIPv6Trie[T any]() *IPv6Trie[T]

func (*IPv6Trie[T]) Find added in v0.3.0

func (t *IPv6Trie[T]) Find(ipStr string) (matched T, exists bool)

func (*IPv6Trie[T]) Insert added in v0.3.0

func (t *IPv6Trie[T]) Insert(prefix string, value T) error

Jump to

Keyboard shortcuts

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