Versions in this module Expand all Collapse all v1 v1.1.0 Jul 26, 2018 v1.0.0 Jun 3, 2018 Changes in this version + const DuplicateIPError + const DuplicatedENIError + const ENIInUseError + const IPInUseError + const UnknownENIError + const UnknownIPError + var ErrUnknownPod = errors.New("datastore: unknown pod") + var ErrUnknownPodIP = errors.New("datastore: pod using unknown IP address") + type AddressInfo struct + Assigned bool + type DataStore struct + func NewDataStore() *DataStore + func (ds *DataStore) AddENI(eniID string, deviceNumber int, isPrimary bool) error + func (ds *DataStore) AddENIIPv4Address(eniID string, ipv4 string) error + func (ds *DataStore) AssignPodIPv4Address(k8sPod *k8sapi.K8SPodInfo) (string, int, error) + func (ds *DataStore) DelENIIPv4Address(eniID string, ipv4 string) error + func (ds *DataStore) DeleteENI(eni string) error + func (ds *DataStore) FreeENI() (string, error) + func (ds *DataStore) GetENIIPPools(eni string) (map[string]*AddressInfo, error) + func (ds *DataStore) GetENIInfos() *ENIInfos + func (ds *DataStore) GetENINeedsIP(maxIPperENI int64) *ENIIPPool + func (ds *DataStore) GetENIs() int + func (ds *DataStore) GetPodInfos() *map[string]PodIPInfo + func (ds *DataStore) GetStats() (int, int) + func (ds *DataStore) UnAssignPodIPv4Address(k8sPod *k8sapi.K8SPodInfo) (string, int, error) + type ENIIPPool struct + AssignedIPv4Addresses int + DeviceNumber int + ID string + IPv4Addresses map[string]*AddressInfo + IsPrimary bool + type ENIInfos struct + AssignedIPs int + ENIIPPools map[string]ENIIPPool + TotalIPs int + type PodIPInfo struct + DeviceNumber int + IP string + type PodInfos map[string]PodIPInfo + type PodKey struct