// Helper that wraps NewAllocatorCIDRRange, for creating a range backed by an in-memory store. func NewPortAllocator(pr net.PortRange) *PortAllocator { return NewPortAllocatorCustom(pr, func(max int, rangeSpec string) allocator.Interface { return allocator.NewAllocationMap(max, rangeSpec) }) }
// Helper that wraps NewAllocatorCIDRRange, for creating a range backed by an in-memory store. func NewCIDRRange(cidr *net.IPNet) *Range { return NewAllocatorCIDRRange(cidr, func(max int, rangeSpec string) allocator.Interface { return allocator.NewAllocationMap(max, rangeSpec) }) }