Versions in this module Expand all Collapse all v0 v0.1.0 Jul 8, 2015 Changes in this version + var ErrBadSubnet = errors.New("Address space does not contain specified subnet") + var ErrIPAlreadyAllocated = errors.New("Address already in use") + var ErrIPOutOfRange = errors.New("Requested address is out of range") + var ErrInvalidAddressSpace = errors.New("Invalid Address Space") + var ErrInvalidIpamConfigService = errors.New("Invalid IPAM Config Service") + var ErrInvalidIpamService = errors.New("Invalid IPAM Service") + var ErrInvalidRequest = errors.New("Invalid Request") + var ErrInvalidSubnet = errors.New("Invalid Subnet") + var ErrIpamInternalError = errors.New("IPAM Internal Error") + var ErrIpamNotAvailable = errors.New("IPAM Service not available") + var ErrNoAvailableIPs = errors.New("No available addresses on subnet") + var ErrNoAvailableSubnet = errors.New("No available subnet") + var ErrOverlapSubnet = errors.New("Subnet overlaps with existing subnet on this address space") + var ErrSubnetAlreadyRegistered = errors.New("Subnet already registered on this address space") + var ErrSubnetNotFound = errors.New("Subnet not found") + type AddressRequest struct + Address net.IP + Endpoint string + OpaqueData []byte + Subnet net.IPNet + func (req *AddressRequest) Validate() error + type AddressResponse struct + Address net.IP + Subnet SubnetInfo + type AddressSpace string + type Allocator struct + App string + ID string + func NewAllocator(ds datastore.DataStore) (*Allocator, error) + func (a *Allocator) AddSubnet(addrSpace AddressSpace, subnetInfo *SubnetInfo) error + func (a *Allocator) AddVendorInfo([]byte) error + func (a *Allocator) DumpDatabase() + func (a *Allocator) Exists() bool + func (a *Allocator) Index() uint64 + func (a *Allocator) Key() []string + func (a *Allocator) KeyPrefix() []string + func (a *Allocator) Release(addrSpace AddressSpace, address net.IP) + func (a *Allocator) RemoveSubnet(addrSpace AddressSpace, subnet *net.IPNet) error + func (a *Allocator) Request(addrSpace AddressSpace, req *AddressRequest) (*AddressResponse, error) + func (a *Allocator) RequestV6(addrSpace AddressSpace, req *AddressRequest) (*AddressResponse, error) + func (a *Allocator) SetIndex(index uint64) + func (a *Allocator) SetValue(value []byte) error + func (a *Allocator) Value() []byte + type Config interface + AddSubnet func(AddressSpace, *SubnetInfo) error + AddVendorInfo func([]byte) error + RemoveSubnet func(AddressSpace, *net.IPNet) error + type IPAM interface + Release func(AddressSpace, net.IP) + Request func(AddressSpace, *AddressRequest) (*AddressResponse, error) + RequestV6 func(AddressSpace, *AddressRequest) (*AddressResponse, error) + type SubnetInfo struct + Gateway net.IP + OpaqueData []byte + Subnet *net.IPNet