ipam

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: MIT Imports: 12 Imported by: 0

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"
)

Functions

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, 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.

Jump to

Keyboard shortcuts

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