Documentation
¶
Overview ¶
Package iplist matches client addresses against a set of CIDR prefixes: a policy's IP allow and deny lists (#358).
A Set holds the prefixes as sorted, merged address ranges, one slice per family, so a lookup is a binary search: a few dozen comparisons at 10,000 prefixes, with no allocation.
Index ¶
Constants ¶
const MaxEntries = 100000
MaxEntries bounds a Set, as the bundle and the CRD bound a policy's lists.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set is an immutable set of addresses. The nil Set is empty. It is safe for concurrent use.
func Parse ¶
Parse returns the set of the CIDR prefixes (10.0.0.0/8, 2001:db8::/32) or addresses in entries. An IPv4-mapped IPv6 prefix of at least /96 is its IPv4 prefix.