Versions in this module Expand all Collapse all v1 v1.0.0 Jul 24, 2018 Changes in this version + var ErrAllocated = errors.New("provided label is already allocated") + var ErrFull = errors.New("range is full") + var ErrMismatchedRange = errors.New("the provided label does not match the current label range") + var ErrNotInRange = errors.New("provided label is not in the valid range") + type Allocator struct + func New(r *mcs.Range, factory allocator.AllocatorFactory) *Allocator + func NewInMemory(r *mcs.Range) *Allocator + func (r *Allocator) Allocate(label *mcs.Label) error + func (r *Allocator) AllocateNext() (*mcs.Label, error) + func (r *Allocator) Free() int + func (r *Allocator) Has(label *mcs.Label) bool + func (r *Allocator) Release(label *mcs.Label) error + func (r *Allocator) Restore(into *mcs.Range, data []byte) error + func (r *Allocator) Snapshot(dst *api.RangeAllocation) error + type Interface interface + Allocate func(*mcs.Label) error + AllocateNext func() (*mcs.Label, error) + Release func(*mcs.Label) error