github.com/cookieai-jar/moby@v17.12.1-ce-rc2+incompatible/api/server/router/network/backend.go (about) 1 package network 2 3 import ( 4 "golang.org/x/net/context" 5 6 "github.com/docker/docker/api/types" 7 "github.com/docker/docker/api/types/filters" 8 "github.com/docker/docker/api/types/network" 9 "github.com/docker/libnetwork" 10 ) 11 12 // Backend is all the methods that need to be implemented 13 // to provide network specific functionality. 14 type Backend interface { 15 FindNetwork(idName string) (libnetwork.Network, error) 16 GetNetworks() []libnetwork.Network 17 CreateNetwork(nc types.NetworkCreateRequest) (*types.NetworkCreateResponse, error) 18 ConnectContainerToNetwork(containerName, networkName string, endpointConfig *network.EndpointSettings) error 19 DisconnectContainerFromNetwork(containerName string, networkName string, force bool) error 20 DeleteNetwork(name string) error 21 NetworksPrune(ctx context.Context, pruneFilters filters.Args) (*types.NetworksPruneReport, error) 22 }