plugins

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelLinkByName

func DelLinkByName(ifName string) error

DelLinkByName deletes the interface with the name ifName.

func Endpoint2IfName

func Endpoint2IfName(endpointID string) string

Endpoint2IfName returns the host interface name for the given endpointID.

func Endpoint2TempIfName added in v0.10.0

func Endpoint2TempIfName(endpointID string) string

Endpoint2TempIfName returns the temporary interface name for the given endpointID.

func IPv4Gateway

func IPv4Gateway(addr *models.NodeAddressing) string

IPv4Gateway returns the IPv4 gateway address for endpoints.

func IPv6Gateway

func IPv6Gateway(addr *models.NodeAddressing) string

IPv6Gateway returns the IPv6 gateway address for endpoints.

func SetupVeth

func SetupVeth(id string, mtu int, ep *models.EndpointChangeRequest) (*netlink.Veth, *netlink.Link, string, error)

SetupVeth sets up the net interface, the temporary interface and fills up some endpoint fields such as LXCMAC, NodeMac, IfIndex and IfName. Returns a pointer for the created veth, a pointer for the temporary link, the name of the temporary link and error if something fails.

func SufficientAddressing

func SufficientAddressing(addr *models.NodeAddressing) error

Types

type ByMask

type ByMask []Route

ByMask is used to sort an array of routes by mask, narrow first.

func (ByMask) Len

func (a ByMask) Len() int

func (ByMask) Less

func (a ByMask) Less(i, j int) bool

func (ByMask) Swap

func (a ByMask) Swap(i, j int)

type Route

type Route struct {
	Prefix  net.IPNet
	Nexthop *net.IP
}

func IPv4Routes

func IPv4Routes(addr *models.NodeAddressing) ([]Route, error)

IPv4Routes returns IPv4 routes to be installed in endpoint's networking namespace.

func IPv6Routes

func IPv6Routes(addr *models.NodeAddressing) ([]Route, error)

IPv6Routes returns IPv6 routes to be installed in endpoint's networking namespace.

Jump to

Keyboard shortcuts

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