Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
Trie is an implementation of Ternary Search Tries to store XID to UID map. It uses Arena to allocate nodes in the trie. It is not thread-safe.
func NewTrie ¶
NewTrie would return back a Trie backed by the provided Arena. Trie would assume ownership of the Arena. Release must be called at the end to release Arena's resources.
func NewTrieFromBuffer ¶ added in v1.8.0
func (*Trie) Get ¶
Get would return the UID for the key. If the key is not found, it would return 0.
Click to show internal directories.
Click to hide internal directories.