2016-10-18 00:36:52 -04:00
|
|
|
package daemon
|
|
|
|
|
|
|
|
import (
|
|
|
|
apitypes "github.com/docker/docker/api/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Cluster is the interface for github.com/docker/docker/daemon/cluster.(*Cluster).
|
|
|
|
type Cluster interface {
|
2017-03-28 06:46:26 -04:00
|
|
|
ClusterStatus
|
|
|
|
NetworkManager
|
|
|
|
}
|
|
|
|
|
|
|
|
// ClusterStatus interface provides information about the Swarm status of the Cluster
|
|
|
|
type ClusterStatus interface {
|
|
|
|
IsAgent() bool
|
|
|
|
IsManager() bool
|
|
|
|
}
|
|
|
|
|
|
|
|
// NetworkManager provides methods to manage networks
|
|
|
|
type NetworkManager interface {
|
2016-10-18 00:36:52 -04:00
|
|
|
GetNetwork(input string) (apitypes.NetworkResource, error)
|
|
|
|
GetNetworks() ([]apitypes.NetworkResource, error)
|
|
|
|
RemoveNetwork(input string) error
|
|
|
|
}
|