kubernetes/pkg/registry/core/service/allocator/storage/storage.go

var errorUnableToAllocate

type Etcd

var _

var _

// NewEtcd returns an allocator that is backed by Etcd and can manage
// persisting the snapshot state of allocation after each allocation is made.
func NewEtcd(alloc allocator.Snapshottable, baseKey string, config *storagebackend.ConfigForResource) (*Etcd, error) {}

// Allocate attempts to allocate the item.
func (e *Etcd) Allocate(offset int) (bool, error) {}

// AllocateNext attempts to allocate the next item.
func (e *Etcd) AllocateNext() (int, bool, error) {}

// Release attempts to release the provided item.
func (e *Etcd) Release(item int) error {}

func (e *Etcd) ForEach(fn func(int)) {}

// tryUpdate performs a read-update to persist the latest snapshot state of allocation.
func (e *Etcd) tryUpdate(fn func() error) error {}

// Get returns an api.RangeAllocation that represents the current state in
// etcd. If the key does not exist, the object will have an empty ResourceVersion.
func (e *Etcd) Get() (*api.RangeAllocation, error) {}

// CreateOrUpdate attempts to update the current etcd state with the provided
// allocation.
func (e *Etcd) CreateOrUpdate(snapshot *api.RangeAllocation) error {}

// Has implements allocator.Interface::Has
func (e *Etcd) Has(item int) bool {}

// Free implements allocator.Interface::Free
func (e *Etcd) Free() int {}

// Destroy implement allocator.Interface::Destroy
func (e *Etcd) Destroy() {}