Versions in this module Expand all Collapse all v0 v0.19.0 Jun 9, 2015 Changes in this version + var ErrAllocated = errors.New("provided IP is already allocated") + var ErrFull = errors.New("range is full") + var ErrMismatchedNetwork = errors.New("the provided network does not match the current range") + var ErrNotInRange = errors.New("provided IP is not in the valid range") + func GetIndexedIP(subnet *net.IPNet, index int) (net.IP, error) + func RangeSize(subnet *net.IPNet) int64 + type Interface interface + Allocate func(net.IP) error + AllocateNext func() (net.IP, error) + Release func(net.IP) error + type Range struct + func NewAllocatorCIDRRange(cidr *net.IPNet, allocatorFactory allocator.AllocatorFactory) *Range + func NewCIDRRange(cidr *net.IPNet) *Range + func (r *Range) Allocate(ip net.IP) error + func (r *Range) AllocateNext() (net.IP, error) + func (r *Range) Free() int + func (r *Range) Has(ip net.IP) bool + func (r *Range) Release(ip net.IP) error + func (r *Range) Restore(net *net.IPNet, data []byte) error + func (r *Range) Snapshot(dst *api.RangeAllocation) error