Documentation ¶
Index ¶
- Variables
- type IP
- type IPAM
- func (ipam *IPAM) AddOrUpdateSubnet(name, cidrStr, gw string, excludeIps []string) error
- func (ipam *IPAM) ContainAddress(address string) bool
- func (ipam *IPAM) DeleteSubnet(subnetName string)
- func (ipam *IPAM) GetPodAddress(podName string) []*SubnetAddress
- func (ipam *IPAM) GetRandomAddress(podName, nicName, mac, subnetName string, skippedAddrs []string, ...) (string, string, string, error)
- func (ipam *IPAM) GetStaticAddress(podName, nicName, ip, mac, subnetName string, checkConflict bool) (string, string, string, error)
- func (ipam *IPAM) GetSubnetV4Mask(subnetName string) (string, error)
- func (ipam *IPAM) IsIPAssignedToOtherPod(ip, subnetName, podName string) (string, bool)
- func (ipam *IPAM) ReleaseAddressByPod(podName, subnetName string)
- type IPRange
- type IPRangeList
- type Subnet
- func (subnet *Subnet) ContainAddress(address IP) bool
- func (subnet *Subnet) GetPodAddress(podName, nicName string) (IP, IP, string, string)
- func (subnet *Subnet) GetRandomAddress(podName, nicName string, mac string, skippedAddrs []string, checkConflict bool) (IP, IP, string, error)
- func (subnet *Subnet) GetRandomMac(podName, nicName string) string
- func (subnet *Subnet) GetStaticAddress(podName, nicName string, ip IP, mac string, force bool, checkConflict bool) (IP, string, error)
- func (subnet *Subnet) GetStaticMac(podName, nicName, mac string, checkConflict bool) error
- func (subnet *Subnet) ReleaseAddress(podName string)
- type SubnetAddress
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type IPAM ¶
func (*IPAM) AddOrUpdateSubnet ¶
func (*IPAM) ContainAddress ¶
func (*IPAM) DeleteSubnet ¶
func (*IPAM) GetPodAddress ¶
func (ipam *IPAM) GetPodAddress(podName string) []*SubnetAddress
func (*IPAM) GetRandomAddress ¶
func (*IPAM) GetStaticAddress ¶
func (*IPAM) GetSubnetV4Mask ¶ added in v1.10.0
func (*IPAM) IsIPAssignedToOtherPod ¶ added in v1.11.0
func (*IPAM) ReleaseAddressByPod ¶
type IPRangeList ¶
type IPRangeList []*IPRange
func (IPRangeList) Contains ¶
func (iprl IPRangeList) Contains(ip IP) bool
type Subnet ¶
type Subnet struct { Name string Protocol string V4CIDR *net.IPNet V4FreeIPList IPRangeList V4ReleasedIPList IPRangeList V4ReservedIPList IPRangeList V4NicToIP map[string]IP V4IPToPod map[IP]string V6CIDR *net.IPNet V6FreeIPList IPRangeList V6ReleasedIPList IPRangeList V6ReservedIPList IPRangeList V6NicToIP map[string]IP V6IPToPod map[IP]string NicToMac map[string]string MacToPod map[string]string PodToNicList map[string][]string V4Gw string V6Gw string // contains filtered or unexported fields }
func (*Subnet) ContainAddress ¶
func (*Subnet) GetPodAddress ¶
This func is only called in ipam.GetPodAddress, move mutex to caller
func (*Subnet) GetRandomAddress ¶
func (*Subnet) GetRandomMac ¶
func (*Subnet) GetStaticAddress ¶
func (*Subnet) GetStaticMac ¶
func (*Subnet) ReleaseAddress ¶
type SubnetAddress ¶
Click to show internal directories.
Click to hide internal directories.