Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoveVethFromOVS ¶
func RemoveVethFromOVS(lu netlink.LinkUpdate) bool
RemoveVethFromOVS remove the veth from the ovs. We get the veth name from the netlink.LinkUpdate and traverse all OpenvSwitches and try to remove the veth from its parent OVS return true will stop the netlink server handler
func SetupVeth ¶
func SetupVeth(contVethName, hostVethName string, mtu int, hostNS ns.NetNS) (net.Interface, net.Interface, error)
SetupVeth sets up a pair of virtual ethernet devices. Call SetupVeth from inside the container netns. It will create both veth devices and move the host-side veth into the provided hostNS namespace. On success, SetupVeth returns (hostVeth, containerVeth, nil)
Types ¶
type NlEventHandler ¶
type NlEventHandler struct {
LinkDeleteHandler []linkReceiver
// contains filtered or unexported fields
}
NlEventHandler is the structure for netlink event handler
func (*NlEventHandler) AddDeletedLinkHandler ¶
func (nl *NlEventHandler) AddDeletedLinkHandler(handler linkReceiver)
AddDeletedLinkHandler will add DeletedLinkHandler
func (*NlEventHandler) TrackNetlink ¶
func (nl *NlEventHandler) TrackNetlink() error
TrackNetlink will track netlink
Click to show internal directories.
Click to hide internal directories.