Documentation ¶
Overview ¶
Package domaintree64 implements radix tree data structure for domain names.
Index ¶
- type Node
- func (n *Node) Delete(d domain.Name) (*Node, bool)
- func (n *Node) DeleteSubdomains(d domain.Name) (*Node, bool)
- func (n *Node) Enumerate() chan Pair
- func (n *Node) Get(d domain.Name) (uint64, bool)
- func (n *Node) InplaceInsert(d domain.Name, v uint64)
- func (n *Node) Insert(d domain.Name, v uint64) *Node
- type Pair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is a radix tree for domain names.
func (*Node) Delete ¶
Delete removes current domain only. It returns new tree and flag if deletion indeed occurs.
func (*Node) DeleteSubdomains ¶
DeleteSubdomains removes current domain and all its subdomains if any. It returns new tree and flag if deletion indeed occurs.
func (*Node) Enumerate ¶
Enumerate returns key-value pairs in given tree. It lists domains in the same order for the same tree.
func (*Node) Get ¶
Get gets value for domain which is equal to domain in the tree or is a subdomain of existing domain.
func (*Node) InplaceInsert ¶
InplaceInsert puts or replaces value using given domain as a key. The method inserts data directly to current tree so make sure you have exclusive access to it.