Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ActivePlugin = PluginDockerBridge
ActivePlugin is set at runtime to the plugin that is chosen to be active. The default mode is docker-bridge
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin interface { // Name returns the network plugin's name. Name() PluginName // PrepareContainerSpec sets any needed options on the container spec before starting the container PrepareContainerSpec(container *runtime.ContainerConfig) error // SetupContainerNetwork sets up the networking for a container // This is ran _after_ the container has been started SetupContainerNetwork(containerID string) (*Result, error) // RemoveContainerNetwork is the method called before a container using the network plugin can be deleted RemoveContainerNetwork(containerID string) error // Status returns error if the network plugin is in error state Status() error }
Plugin describes a generic network plugin
type PluginName ¶
type PluginName string
PluginName defines a name for a network plugin
const ( // PluginCNI specifies the network mode where CNI is used PluginCNI PluginName = "cni" // PluginDockerBridge specifies the default docker bridge network is used PluginDockerBridge PluginName = "docker-bridge" )
func ListPlugins ¶
func ListPlugins() []PluginName
ListPlugins gets the list of available network plugins
func (PluginName) String ¶
func (pn PluginName) String() string
Click to show internal directories.
Click to hide internal directories.