Documentation ¶
Index ¶
- type AddressRange
- type Allocator
- func (a *Allocator) DiscoverDelete(dType discoverapi.DiscoveryType, data interface{}) error
- func (a *Allocator) DiscoverNew(dType discoverapi.DiscoveryType, data interface{}) error
- func (a *Allocator) DumpDatabase() string
- func (a *Allocator) GetDefaultAddressSpaces() (string, string, error)
- func (a *Allocator) ReleaseAddress(poolID string, address net.IP) error
- func (a *Allocator) ReleasePool(poolID string) error
- func (a *Allocator) RequestAddress(poolID string, prefAddress net.IP, opts map[string]string) (*net.IPNet, map[string]string, error)
- func (a *Allocator) RequestPool(addressSpace, pool, subPool string, options map[string]string, v6 bool) (string, *net.IPNet, map[string]string, error)
- type PoolData
- type SubnetKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressRange ¶
AddressRange specifies first and last ip ordinal which identifies a range in a pool of addresses
func (*AddressRange) MarshalJSON ¶
func (r *AddressRange) MarshalJSON() ([]byte, error)
MarshalJSON returns the JSON encoding of the Range object
func (*AddressRange) String ¶
func (r *AddressRange) String() string
String returns the string form of the AddressRange object
func (*AddressRange) UnmarshalJSON ¶
func (r *AddressRange) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes data into the Range object
type Allocator ¶
Allocator provides per address space ipv4/ipv6 book keeping
func NewAllocator ¶
NewAllocator returns an instance of libnetwork ipam
func (*Allocator) DiscoverDelete ¶
func (a *Allocator) DiscoverDelete(dType discoverapi.DiscoveryType, data interface{}) error
DiscoverDelete is a notification of no interest for the allocator
func (*Allocator) DiscoverNew ¶
func (a *Allocator) DiscoverNew(dType discoverapi.DiscoveryType, data interface{}) error
DiscoverNew informs the allocator about a new global scope datastore
func (*Allocator) DumpDatabase ¶
DumpDatabase dumps the internal info
func (*Allocator) GetDefaultAddressSpaces ¶
GetDefaultAddressSpaces returns the local and global default address spaces
func (*Allocator) ReleaseAddress ¶
ReleaseAddress releases the address from the specified pool ID
func (*Allocator) ReleasePool ¶
ReleasePool releases the address pool identified by the passed id
type PoolData ¶
type PoolData struct { ParentKey SubnetKey Pool *net.IPNet Range *AddressRange `json:",omitempty"` RefCount int }
PoolData contains the configured pool data
func (*PoolData) MarshalJSON ¶
MarshalJSON returns the JSON encoding of the PoolData object
func (*PoolData) UnmarshalJSON ¶
UnmarshalJSON decodes data into the PoolData object
type SubnetKey ¶
SubnetKey is the pointer to the configured pools in each address space
func (*SubnetKey) FromString ¶
FromString populates the SubnetKey object reading it from string