2015-10-26 21:47:48 +00:00
|
|
|
package network
|
|
|
|
|
|
|
|
import (
|
2016-03-28 17:41:06 +00:00
|
|
|
"github.com/docker/engine-api/types"
|
|
|
|
"github.com/docker/engine-api/types/filters"
|
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
|
2016-03-28 17:41:06 +00:00
|
|
|
FilterNetworks(netFilters filters.Args) ([]libnetwork.Network, error)
|
|
|
|
CreateNetwork(types.NetworkCreate) (*types.NetworkCreateResponse, 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
|
|
|
}
|