Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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, portmappings ...meta.PortMapping) (*Result, error)
// RemoveContainerNetwork is the method called before a container using the network plugin can be deleted
RemoveContainerNetwork(containerID string, portmappings ...meta.PortMapping) 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.