cni

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	LocalNetName  = "lo"
	DefNetName    = "net"
	PluginConfDir = "/etc/cni/net.d"
	PluginBinDir  = "/opt/cni/bin"
)

CNI default values to find plugins and configurations.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkPlugin

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

NetworkPlugin is the CNI network plugin handler.

func NewNetworkPlugin

func NewNetworkPlugin() (*NetworkPlugin, error)

NewNetworkPlugin initialize the CNI network plugin and returns a handler to it.

func (*NetworkPlugin) AddNetwork

func (plugin *NetworkPlugin) AddNetwork(podID string, netNSPath string, ifName string) (*types.Result, error)

AddNetwork calls the CNI plugin to create a network between the host and the network namespace.

func (*NetworkPlugin) RemoveNetwork

func (plugin *NetworkPlugin) RemoveNetwork(podID string, netNSPath string, ifName string) error

RemoveNetwork calls the CNI plugin to remove a specific network previously created between the host and the network namespace.

Jump to

Keyboard shortcuts

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