cni

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// CNIPluginName describes the name of the CNI network plugin
	CNIPluginName = "cni"
	// DefaultInterfaceName describes the interface name that the CNI network plugin will set up
	DefaultInterfaceName = "eth0"
	// CNIBinDir describes the directory where the CNI binaries are stored
	CNIBinDir = "/opt/cni/bin"
	// CNIConfDir describes the directory where the CNI plugin's configuration is stored
	// TODO: CNIBinDir and CNIConfDir should maybe be globally configurable?
	CNIConfDir = "/etc/cni/net.d"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkPlugin

type NetworkPlugin interface {
	// Name returns the network plugin's name.
	Name() string

	// SetupContainerNetwork sets up the networking for a Docker container using CNI
	SetupContainerNetwork(containerID string) error

	// RemoveContainerNetwork is the method called before a container using the CNI network can be deleted
	RemoveContainerNetwork(containerID string) error

	// Status returns error if the network plugin is in error state
	Status() error
}

NetworkPlugin describes a network plugin for docker

func GetCNINetworkPlugin

func GetCNINetworkPlugin(runtime runtime.Interface) (NetworkPlugin, error)

Jump to

Keyboard shortcuts

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