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