Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TrieMap ¶
type TrieMap[V comparable] struct { // contains filtered or unexported fields }
TrieMap contains an efficient trie structure of netip.Prefix that can match a netip.Addr to the associated Prefix if any and return the value associated with it of type V.
Use NewTrieMap to instantiate ¶
NOTE: This is insert-only (no delete) and insertion is *not* thread-safe.
Currently this is a simple TrieMap, in the future it may have compression.
See: https://vincent.bernat.ch/en/blog/2017-ipv4-route-lookup-linux
For benchmarks with real data see ./aws/mapper_test.go
func NewTrieMap ¶
func NewTrieMap[V comparable]() *TrieMap[V]
NewTrieMap[V] returns a new, properly allocated TrieMap[V]
Click to show internal directories.
Click to hide internal directories.