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