Documentation ¶
Index ¶
- func AssignIP(ipamConf types.IPAMConfig, reservelist []types.IPReservation, ...) (net.IPNet, []types.IPReservation, error)
- func DeallocateIP(reservelist []types.IPReservation, containerID string) ([]types.IPReservation, net.IP, error)
- func GetIPRange(ip net.IP, ipnet net.IPNet) (net.IP, net.IP, error)
- func IPAddOffset(ip net.IP, offset uint64) net.IP
- func IPGetOffset(ip1, ip2 net.IP) uint64
- func IsIPv4(checkip net.IP) bool
- func IterateForAssignment(ipnet net.IPNet, rangeStart net.IP, rangeEnd net.IP, ...) (net.IP, []types.IPReservation, error)
- func IterateForDeallocation(reservelist []types.IPReservation, containerID string, ...) ([]types.IPReservation, net.IP, error)
- type AssignmentError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignIP ¶
func AssignIP(ipamConf types.IPAMConfig, reservelist []types.IPReservation, containerID string, podRef string) (net.IPNet, []types.IPReservation, error)
AssignIP assigns an IP using a range and a reserve list.
func DeallocateIP ¶
func DeallocateIP(reservelist []types.IPReservation, containerID string) ([]types.IPReservation, net.IP, error)
DeallocateIP assigns an IP using a range and a reserve list.
func GetIPRange ¶
GetIPRange returns the first and last IP in a range
func IPAddOffset ¶
IPAddOffset show IP address plus given offset
func IPGetOffset ¶
IPGetOffset gets offset between ip1 and ip2. This assumes ip1 > ip2 (from IP representation point of view)
func IterateForAssignment ¶
func IterateForAssignment(ipnet net.IPNet, rangeStart net.IP, rangeEnd net.IP, reservelist []types.IPReservation, excludeRanges []string, containerID string, podRef string) (net.IP, []types.IPReservation, error)
IterateForAssignment iterates given an IP/IPNet and a list of reserved IPs
func IterateForDeallocation ¶
func IterateForDeallocation( reservelist []types.IPReservation, containerID string, matchingFunction func(reservation []types.IPReservation, id string) int) ([]types.IPReservation, net.IP, error)
IterateForDeallocation iterates overs currently reserved IPs and the deallocates given the container id.
Types ¶
type AssignmentError ¶
type AssignmentError struct {
// contains filtered or unexported fields
}
AssignmentError defines an IP assignment error.
func (AssignmentError) Error ¶
func (a AssignmentError) Error() string
Click to show internal directories.
Click to hide internal directories.