Expand description
IP address allocation for overlay networks
Manages allocation and tracking of overlay IP addresses within a CIDR range. Supports both IPv4 and IPv6 (dual-stack) networks.
Structs§
- IpAllocator
- IP allocator for overlay network addresses
- IpAllocator
State - Persistent state for IP allocator
- Node
Slice Allocator - Leader-side allocator that carves per-node slices out of a cluster CIDR.
- Node
Slice Allocator Snapshot - Persistent snapshot of a
NodeSliceAllocatorfor raft/disk persistence. - Service
Subnet Registry - Tracks per-service-per-node subnet assignments carved from the cluster
CIDR. Each
(service_name, node_id)pair gets its own slice of sizeslice_prefix(default/28). Assignments are deterministic — the same(service, node)pair always maps to the same starting slot via FNV hash, with linear probing on collision. MirrorsNodeSliceAllocator’s pattern; see that type for the rationale (in particular the choice of FNV overDefaultHasherfor cross-process reproducibility). - Service
Subnet Registry Snapshot - Persistent snapshot of a
ServiceSubnetRegistryfor raft/disk persistence.
Functions§
- first_
ip_ from_ cidr - Helper function to get the first usable IP from a CIDR