2015-10-26 14:47:48 -07:00
|
|
|
package network
|
|
|
|
|
|
|
|
import (
|
2016-01-04 19:05:26 -05:00
|
|
|
"github.com/docker/engine-api/types/network"
|
2015-10-26 14:47:48 -07:00
|
|
|
"github.com/docker/libnetwork"
|
|
|
|
)
|
|
|
|
|
2015-12-30 18:20:41 +01:00
|
|
|
// Backend is all the methods that need to be implemented
|
|
|
|
// to provide network specific functionality.
|
2015-10-26 14:47:48 -07:00
|
|
|
type Backend interface {
|
2015-12-30 18:20:41 +01:00
|
|
|
NetworkControllerEnabled() bool
|
|
|
|
|
2015-10-26 14:47:48 -07:00
|
|
|
FindNetwork(idName string) (libnetwork.Network, error)
|
2015-12-30 18:20:41 +01:00
|
|
|
GetNetworkByName(idName string) (libnetwork.Network, error)
|
2015-10-26 14:47:48 -07:00
|
|
|
GetNetworksByID(partialID string) []libnetwork.Network
|
2015-11-10 16:57:06 +08:00
|
|
|
GetAllNetworks() []libnetwork.Network
|
2015-12-10 14:02:50 +00:00
|
|
|
CreateNetwork(name, driver string, ipam network.IPAM, options map[string]string, internal bool, enableIPv6 bool) (libnetwork.Network, error)
|
2016-01-07 16:18:34 -08:00
|
|
|
ConnectContainerToNetwork(containerName, networkName string, endpointConfig *network.EndpointSettings) error
|
2015-12-30 18:20:41 +01:00
|
|
|
DisconnectContainerFromNetwork(containerName string, network libnetwork.Network, force bool) error
|
2015-12-21 23:35:30 -05:00
|
|
|
DeleteNetwork(name string) error
|
2015-10-26 14:47:48 -07:00
|
|
|
}
|