2015-10-26 17:47:48 -04:00
|
|
|
package network
|
|
|
|
|
|
|
|
import (
|
2016-09-06 14:46:37 -04:00
|
|
|
"github.com/docker/docker/api/types"
|
2016-11-17 00:46:37 -05:00
|
|
|
"github.com/docker/docker/api/types/filters"
|
2016-09-06 14:46:37 -04:00
|
|
|
"github.com/docker/docker/api/types/network"
|
2015-10-26 17:47:48 -04:00
|
|
|
"github.com/docker/libnetwork"
|
|
|
|
)
|
|
|
|
|
2015-12-30 12:20:41 -05:00
|
|
|
// Backend is all the methods that need to be implemented
|
|
|
|
// to provide network specific functionality.
|
2015-10-26 17:47:48 -04:00
|
|
|
type Backend interface {
|
|
|
|
FindNetwork(idName string) (libnetwork.Network, error)
|
2016-06-13 22:52:49 -04:00
|
|
|
GetNetworks() []libnetwork.Network
|
2016-04-13 04:33:46 -04:00
|
|
|
CreateNetwork(nc types.NetworkCreateRequest) (*types.NetworkCreateResponse, error)
|
2016-01-07 19:18:34 -05:00
|
|
|
ConnectContainerToNetwork(containerName, networkName string, endpointConfig *network.EndpointSettings) error
|
2016-08-26 16:08:28 -04:00
|
|
|
DisconnectContainerFromNetwork(containerName string, networkName string, force bool) error
|
2015-12-21 23:35:30 -05:00
|
|
|
DeleteNetwork(name string) error
|
2016-11-17 00:46:37 -05:00
|
|
|
NetworksPrune(pruneFilters filters.Args) (*types.NetworksPruneReport, error)
|
2015-10-26 17:47:48 -04:00
|
|
|
}
|