ipam

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Free

func Free(danmClient danmclientset.Interface, netInfo danmtypes.DanmNet, ip string) error

Free inspects the network object received as an input, and releases an IPv4 or IPv6 address from the appropriate allocation pool The IP address liberation is represented by unsetting a bit in the network's BitArray type allocation matrix The refreshed network object is modified in the K8s API server at the end

func GarbageCollectIps

func GarbageCollectIps(danmClient danmclientset.Interface, netInfo *danmtypes.DanmNet, ip4, ip6 string)

func Int2ip

func Int2ip(nn uint32) net.IP

Int2ip converts an IP address stored as a native Golang big endian, 32-bit integer to an IP represented according to the Golang net package

func Int2ip6

func Int2ip6(nn *big.Int) net.IP

Int2ip6 converts an IP address stored as a native Golang big endian, 64-bit integer to an IP represented according to the Golang net package

func Ip2int

func Ip2int(ip net.IP) uint32

Ip2int converts an IP address stored according to the Golang net package to a native Golang big endian, 32-bit integer

func Ip62int

func Ip62int(ip6 net.IP) *big.Int

Ip62int converts an IPv6 address stored according to the Golang net package to a native Golang big endian, 64-bit integer

func Reserve

func Reserve(danmClient danmclientset.Interface, netInfo danmtypes.DanmNet, req4, req6 string) (string, string, string, error)

Reserve inspects the network object received as an input, and allocates an IPv4 or IPv6 address from the appropriate allocation pool In case static IP allocation is requested, it will try reserver the requested error. If it is not possible, it returns an error The reserved IP address is represented by setting a bit in the network's BitArray type allocation matrix The refreshed network object is modified in the K8s API server at the end

Types

This section is empty.

Jump to

Keyboard shortcuts

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