Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Tree ¶
type Tree[T comparable] interface { AddCIDR(cidr string, val T) error AddCIDRb(cidr []byte, val T) error SetCIDR(cidr string, val T) error SetCIDRb(cidr []byte, val T) error DeleteWholeRangeCIDR(cidr string) error DeleteWholeRangeCIDRb(cidr []byte) error DeleteCIDR(cidr string) error DeleteCIDRb(cidr []byte) error FindCIDR(cidr string) (T, bool, error) FindCIDRb(cidr []byte) (T, bool, error) }
func New ¶
func New[T comparable](preallocate int) Tree[T]
New creates tree and preallocates (if preallocate not zero) number of nodes that would be ready to fill with data.
Click to show internal directories.
Click to hide internal directories.