util

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateContainerInterfaceKey added in v0.3.0

func GenerateContainerInterfaceKey(podName, podNamespace string) string

GenerateContainerInterfaceKey generates a unique string for a Pod interface as: pod/<Pod-Namespace-name>/<Pod-name>.

func GenerateContainerInterfaceName

func GenerateContainerInterfaceName(podName string, podNamespace string) string

GenerateContainerInterfaceName generates a unique interface name using the Pod's Namespace and name. The output should be deterministic (so that multiple calls to GenerateContainerInterfaceName with the same parameters return the same value). The output has the length of interfaceNameLength(15). The probability of collision should be neglectable.

func GenerateNodeTunnelInterfaceKey added in v0.3.0

func GenerateNodeTunnelInterfaceKey(nodeName string) string

GenerateNodeTunnelInterfaceKey generates a unique string for a Node's tunnel interface as: node/<Node-name>.

func GenerateNodeTunnelInterfaceName added in v0.3.0

func GenerateNodeTunnelInterfaceName(nodeName string) string

GenerateNodeTunnelInterfaceName generates a unique interface name for the tunnel to the Node, using the Node's name.

func GetIPNetDeviceFromIP added in v0.4.0

func GetIPNetDeviceFromIP(localIP net.IP) (*net.IPNet, netlink.Link, error)

GetIPNetDeviceFromIP returns a local IP/mask and associated device from IP.

func GetNetLink(dev string) netlink.Link

GetNetLink returns dev link from name.

Types

This section is empty.

Directories

Path Synopsis
Package ethtool provides Go wrappers for ioctl ethtool system calls on Linux
Package ethtool provides Go wrappers for ioctl ethtool system calls on Linux

Jump to

Keyboard shortcuts

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