ipam

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Manager []ipManager

Manager - handles the addresses for each namespace/vip

Functions

func FindAvailableHostFromCidr

func FindAvailableHostFromCidr(namespace, cidr string, inUseIPSet *netipx.IPSet, kubevipLBConfig *config.KubevipLBConfig) (string, error)

FindAvailableHostFromCidr - will look through the cidr and the address Manager and find a free address (if possible)

func FindAvailableHostFromRange

func FindAvailableHostFromRange(namespace, ipRange string, inUseIPSet *netipx.IPSet, kubevipLBConfig *config.KubevipLBConfig) (string, error)

FindAvailableHostFromRange - will look through the cidr and the address Manager and find a free address (if possible)

func FindFreeAddress added in v0.0.6

func FindFreeAddress(poolIPSet *netipx.IPSet, inUseIPSet *netipx.IPSet, kubevipLBConfig *config.KubevipLBConfig) (netip.Addr, error)

FindFreeAddress returns the next free IP Address in a range based on a set of existing addresses. It will skip assumed gateway ip or broadcast ip for IPv4 address

func SplitCIDRsByIPFamily added in v0.0.8

func SplitCIDRsByIPFamily(cidrs string) (ipv4 string, ipv6 string, err error)

SplitCIDRsByIPFamily splits the cidrs into separate lists of ipv4 and ipv6 CIDRs

func SplitRangesByIPFamily added in v0.0.8

func SplitRangesByIPFamily(ipRangeString string) (ipv4 string, ipv6 string, err error)

SplitRangesByIPFamily splits the ipRangeString into separate lists of ipv4 and ipv6 ranges

Types

type OutOfIPsError added in v0.0.8

type OutOfIPsError struct {
	// contains filtered or unexported fields
}

OutOfIPsError stores informations that are required to return out of ip error

func (*OutOfIPsError) Error added in v0.0.8

func (e *OutOfIPsError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL