Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tree ¶
type Tree interface {
// Find the IpRange for a given ip, returns nil if none matches.
FindIPRange(ip net.IP) *source.IPRange
// Add a new IpRange to the tree.
Add(ipRange *source.IPRange)
// Serialize the tree to a buffer.
SerializeTo(w io.Writer)
// Get all ranges stored in tree, after duduplication ...
GetAllRanges() []*source.IPRange
}
This package implements a segement tree for ip ranges, that can be saved & loaded to/from a file at build time.
func NewIPv6Tree ¶
func NewIPv6Tree() Tree
Click to show internal directories.
Click to hide internal directories.