Versions in this module Expand all Collapse all v1 v1.5.1 Apr 28, 2017 Changes in this version + var ErrAllocated = errors.New("provided netid is already allocated") + var ErrFull = errors.New("range is full") + var ErrNotInRange = errors.New("provided netid is not in the valid range") + type Allocator struct + func New(r *NetIDRange, allocatorFactory allocator.AllocatorFactory) *Allocator + func NewInMemory(r *NetIDRange) *Allocator + func (r *Allocator) Allocate(id uint32) error + func (r *Allocator) AllocateNext() (uint32, error) + func (r *Allocator) Free() int + func (r *Allocator) Has(id uint32) bool + func (r *Allocator) Release(id uint32) error + type Interface interface + Allocate func(uint32) error + AllocateNext func() (uint32, error) + Has func(uint32) bool + Release func(uint32) error + type NetIDRange struct + Base uint32 + Size uint32 + func NewNetIDRange(min, max uint32) (*NetIDRange, error) + func (r *NetIDRange) Contains(netid uint32) (bool, uint32) + func (r *NetIDRange) Set(base, size uint32) error + func (r *NetIDRange) String() string v1.5.0-alpha.1 Dec 29, 2016 Incompatible versions in this module v3.7.0-alpha.0+incompatible Aug 1, 2017