ipam

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 6 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, descOrder bool) (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, descOrder bool) (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, descOrder bool) (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
}

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