netcontrol

package
v3.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 7, 2019 License: BSD-3-Clause Imports: 20 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAllocationArray

func CreateAllocationArray(dnet *danmtypes.DanmNet) (*bitarray.BitArray, error)

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 PutDanmNet

func PutDanmNet(client client.DanmNetInterface, dnet *danmtypes.DanmNet) (bool, error)

func ValidateAllocationPool

func ValidateAllocationPool(dnet *danmtypes.DanmNet) error

Types

type Handler

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

Handler represents an object watching the K8s API for changes in the DanmNet API path Upon the reception of a notification it validates the body, and handles the related VxLAN/VLAN/RT creation/deletions on the host

func NewHandler

func NewHandler(cfg *rest.Config) (Handler, error)

NewHandler initializes and returns a new Handler object Upon the reception of a notification it performs DanmNet validation, and host network management operations Handler contains additional members: one performing HTTPS operations, the other to interact with DamnEp objects

func (Handler) CreateController

func (dnetHandler Handler) CreateController() cache.Controller

type LinkInfo

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

LinkInfo is an absract struct to represent a host NIC of a special type: either VLAN, or VxLAN The ID of the link is stored together with its Golang representation

Jump to

Keyboard shortcuts

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