Help us shape the future of Go! Take the 2026 Go Developer Survey

ipam

package
v1.7.20 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 24 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// Default address space IDs.
	LocalDefaultAddressSpaceId  = "local"
	GlobalDefaultAddressSpaceId = "global"
)
View Source
const (
	// Address space scopes.
	LocalScope = iota
	GlobalScope
)

Variables

View Source
var (

	// Options used by AddressManager.
	OptInterfaceName      = "azure.interface.name"
	OptAddressID          = "azure.address.id"
	OptAddressType        = "azure.address.type"
	OptAddressTypeGateway = "gateway"
)
View Source
var ErrNoAvailableAddressPools = fmt.Errorf("no available address pools")

Exportable errors returned by AddressManager

Functions

func CompareK8sVer

func CompareK8sVer(firstVer *version.Info, secondVer *version.Info) int

CompareK8sVer compares two k8s versions. returns -1, 0, 1 if firstVer smaller, equals, bigger than secondVer respectively. returns -2 for error.

func NewAddressPoolId

func NewAddressPoolId(asId string, subnet string, childSubnet string) *addressPoolId

Creates a new address pool ID object.

func NewAddressPoolIdFromString

func NewAddressPoolIdFromString(s string) (*addressPoolId, error)

Creates a new pool ID from a string representation.

Types

type AddressManager

type AddressManager interface {
	Initialize(config *common.PluginConfig, rehydrateIpamInfoOnReboot bool, options map[string]interface{}) error
	Uninitialize()

	StartSource(options map[string]interface{}) error
	StopSource()

	GetDefaultAddressSpaces() (string, string)

	RequestPool(asId, poolId, subPoolId string, options map[string]string, v6 bool) (string, string, error)
	ReleasePool(asId, poolId string) error
	GetPoolInfo(asId, poolId string) (*AddressPoolInfo, error)

	RequestAddress(asId, poolId, address string, options map[string]string) (string, error)
	ReleaseAddress(asId, poolId, address string, options map[string]string) error
}

AddressManager API.

func NewAddressManager

func NewAddressManager() (AddressManager, error)

Creates a new address manager.

type AddressPoolInfo

type AddressPoolInfo struct {
	Subnet         net.IPNet
	Gateway        net.IP
	DnsServers     []net.IP
	UnhealthyAddrs []net.IP
	IsIPv6         bool
	Available      int
	Capacity       int
}

AddressPoolInfo contains information about an address pool.

type IPAddress

type IPAddress struct {
	Address   string
	IsPrimary bool
}

type IPSubnet

type IPSubnet struct {
	Prefix      string
	IPAddresses []IPAddress
}

type Interface

type Interface struct {
	MacAddress string
	IsPrimary  bool
	IPSubnets  []IPSubnet
}

type NetworkInterfaces

type NetworkInterfaces struct {
	Interfaces []Interface
}

MAS host agent JSON object format.

Jump to

Keyboard shortcuts

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