github.com/ncdc/docker@v0.10.1-0.20160129113957-6c6729ef5b74/api/server/router/network/backend.go (about)

     1  package network
     2  
     3  import (
     4  	"github.com/docker/engine-api/types/network"
     5  	"github.com/docker/libnetwork"
     6  )
     7  
     8  // Backend is all the methods that need to be implemented to provide
     9  // network specific functionality
    10  type Backend interface {
    11  	FindNetwork(idName string) (libnetwork.Network, error)
    12  	GetNetwork(idName string, by int) (libnetwork.Network, error)
    13  	GetNetworksByID(partialID string) []libnetwork.Network
    14  	GetAllNetworks() []libnetwork.Network
    15  	CreateNetwork(name, driver string, ipam network.IPAM,
    16  		options map[string]string, internal bool) (libnetwork.Network, error)
    17  	ConnectContainerToNetwork(containerName, networkName string, endpointConfig *network.EndpointSettings) error
    18  	DisconnectContainerFromNetwork(containerName string,
    19  		network libnetwork.Network, force bool) error
    20  	NetworkControllerEnabled() bool
    21  	DeleteNetwork(name string) error
    22  }