backend.go 793 B

1234567891011121314151617181920212223
  1. package network
  2. import (
  3. // TODO: network config needs to be refactored out to a
  4. // different location
  5. "github.com/docker/docker/daemon/network"
  6. "github.com/docker/libnetwork"
  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. CreateNetwork(name, driver string, ipam network.IPAM,
  15. options map[string]string) (libnetwork.Network, error)
  16. ConnectContainerToNetwork(containerName, networkName string) error
  17. DisconnectContainerFromNetwork(containerName string,
  18. network libnetwork.Network) error
  19. NetworkControllerEnabled() bool
  20. }