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

package ipam

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

Index

Package Files

allocator.go store.go structures.go utils.go

type AddressRange Uses

type AddressRange struct {
    Sub        *net.IPNet
    Start, End uint64
}

AddressRange specifies first and last ip ordinal which identifies a range in a pool of addresses

func (*AddressRange) MarshalJSON Uses

func (r *AddressRange) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of the Range object

func (*AddressRange) String Uses

func (r *AddressRange) String() string

String returns the string form of the AddressRange object

func (*AddressRange) UnmarshalJSON Uses

func (r *AddressRange) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes data into the Range object

type Allocator Uses

type Allocator struct {
    sync.Mutex
    // contains filtered or unexported fields
}

Allocator provides per address space ipv4/ipv6 book keeping

func NewAllocator Uses

func NewAllocator(lcDs, glDs datastore.DataStore) (*Allocator, error)

NewAllocator returns an instance of libnetwork ipam

func (*Allocator) DiscoverDelete Uses

func (a *Allocator) DiscoverDelete(dType discoverapi.DiscoveryType, data interface{}) error

DiscoverDelete is a notification of no interest for the allocator

func (*Allocator) DiscoverNew Uses

func (a *Allocator) DiscoverNew(dType discoverapi.DiscoveryType, data interface{}) error

DiscoverNew informs the allocator about a new global scope datastore

func (*Allocator) DumpDatabase Uses

func (a *Allocator) DumpDatabase() string

DumpDatabase dumps the internal info

func (*Allocator) GetDefaultAddressSpaces Uses

func (a *Allocator) GetDefaultAddressSpaces() (string, string, error)

GetDefaultAddressSpaces returns the local and global default address spaces

func (*Allocator) IsBuiltIn Uses

func (a *Allocator) IsBuiltIn() bool

IsBuiltIn returns true for builtin drivers

func (*Allocator) ReleaseAddress Uses

func (a *Allocator) ReleaseAddress(poolID string, address net.IP) error

ReleaseAddress releases the address from the specified pool ID

func (*Allocator) ReleasePool Uses

func (a *Allocator) ReleasePool(poolID string) error

ReleasePool releases the address pool identified by the passed id

func (*Allocator) RequestAddress Uses

func (a *Allocator) RequestAddress(poolID string, prefAddress net.IP, opts map[string]string) (*net.IPNet, map[string]string, error)

RequestAddress returns an address from the specified pool ID

func (*Allocator) RequestPool Uses

func (a *Allocator) RequestPool(addressSpace, pool, subPool string, options map[string]string, v6 bool) (string, *net.IPNet, map[string]string, error)

RequestPool returns an address pool along with its unique id. addressSpace must be a valid address space name and must not be the empty string. If pool is the empty string then the default predefined pool for addressSpace will be used, otherwise pool must be a valid IP address and length in CIDR notation. If subPool is not empty, it must be a valid IP address and length in CIDR notation which is a sub-range of pool. subPool must be empty if pool is empty.

type PoolData Uses

type PoolData struct {
    ParentKey SubnetKey
    Pool      *net.IPNet
    Range     *AddressRange `json:",omitempty"`
    RefCount  int
}

PoolData contains the configured pool data

func (*PoolData) CopyTo Uses

func (p *PoolData) CopyTo(dstP *PoolData) error

CopyTo deep copies the pool data to the destination pooldata

func (*PoolData) MarshalJSON Uses

func (p *PoolData) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of the PoolData object

func (*PoolData) String Uses

func (p *PoolData) String() string

String returns the string form of the PoolData object

func (*PoolData) UnmarshalJSON Uses

func (p *PoolData) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes data into the PoolData object

type SubnetKey Uses

type SubnetKey struct {
    AddressSpace string
    Subnet       string
    ChildSubnet  string
}

SubnetKey is the pointer to the configured pools in each address space

func (*SubnetKey) FromString Uses

func (s *SubnetKey) FromString(str string) error

FromString populates the SubnetKey object reading it from string

func (*SubnetKey) String Uses

func (s *SubnetKey) String() string

String returns the string form of the SubnetKey object

Package ipam imports 13 packages (graph). Updated 2018-08-22. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).