cluster.go 707 B

1234567891011121314151617181920212223242526
  1. package daemon
  2. import (
  3. apitypes "github.com/docker/docker/api/types"
  4. lncluster "github.com/docker/libnetwork/cluster"
  5. )
  6. // Cluster is the interface for github.com/docker/docker/daemon/cluster.(*Cluster).
  7. type Cluster interface {
  8. ClusterStatus
  9. NetworkManager
  10. SendClusterEvent(event lncluster.ConfigEventType)
  11. }
  12. // ClusterStatus interface provides information about the Swarm status of the Cluster
  13. type ClusterStatus interface {
  14. IsAgent() bool
  15. IsManager() bool
  16. }
  17. // NetworkManager provides methods to manage networks
  18. type NetworkManager interface {
  19. GetNetwork(input string) (apitypes.NetworkResource, error)
  20. GetNetworks() ([]apitypes.NetworkResource, error)
  21. RemoveNetwork(input string) error
  22. }