package ipam
import "github.com/docker/libnetwork/ipam"
Index ¶
- type AddressRange
- func (r *AddressRange) MarshalJSON() ([]byte, error)
- func (r *AddressRange) String() string
- func (r *AddressRange) UnmarshalJSON(data []byte) error
- type Allocator
- func NewAllocator(lcDs, glDs datastore.DataStore) (*Allocator, 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
- func (p *PoolData) CopyTo(dstP *PoolData) error
- func (p *PoolData) MarshalJSON() ([]byte, error)
- func (p *PoolData) String() string
- func (p *PoolData) UnmarshalJSON(data []byte) error
- type SubnetKey
Types ¶
type AddressRange ¶
AddressRange specifies first and last ip ordinal which identify a range in a 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) 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
func (*Allocator) RequestAddress ¶
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 ¶
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.
type PoolData ¶
type PoolData struct { ParentKey SubnetKey Pool *net.IPNet Range *AddressRange `json:",omitempty"` RefCount int }
PoolData contains the configured pool data
func (*PoolData) CopyTo ¶
CopyTo deep copies the pool data to the destination pooldata
func (*PoolData) MarshalJSON ¶
MarshalJSON returns the JSON encoding of the PoolData object
func (*PoolData) String ¶
String returns the string form 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 populate the SubnetKey object reading it from string
func (*SubnetKey) String ¶
String returns the string form of the SubnetKey object
Source Files ¶
allocator.go store.go structures.go utils.go
- Version
- v0.5.6 (latest)
- Published
- Jan 15, 2016
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 2 hours ago –
Tools for package owners.