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: 5 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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