docker: github.com/docker/docker/vendor/github.com/docker/libnetwork/idm Index | Files

package idm

import "github.com/docker/docker/vendor/github.com/docker/libnetwork/idm"

Package idm manages reservation/release of numerical ids from a configured set of contiguous ids

Index

Package Files

idm.go

type Idm Uses

type Idm struct {
    // contains filtered or unexported fields
}

Idm manages the reservation/release of numerical ids from a contiguous set

func New Uses

func New(ds datastore.DataStore, id string, start, end uint64) (*Idm, error)

New returns an instance of id manager for a [start,end] set of numerical ids

func (*Idm) GetID Uses

func (i *Idm) GetID(serial bool) (uint64, error)

GetID returns the first available id in the set

func (*Idm) GetIDInRange Uses

func (i *Idm) GetIDInRange(start, end uint64, serial bool) (uint64, error)

GetIDInRange returns the first available id in the set within a [start,end] range

func (*Idm) GetSpecificID Uses

func (i *Idm) GetSpecificID(id uint64) error

GetSpecificID tries to reserve the specified id

func (*Idm) Release Uses

func (i *Idm) Release(id uint64)

Release releases the specified id

Package idm imports 4 packages (graph). Updated 2018-02-14. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).