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