Files
docker-cli/components/engine/daemon/cluster.go
Sebastiaan van Stijn 38224530f1 Add NetworkManager and ClusterStatus interfaces
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8f4f85dd5b5b6b7268428b8f95f56c1ba8608ac3
Component: engine
2017-03-28 16:35:14 +02:00

25 lines
606 B
Go

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 {
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 {
GetNetwork(input string) (apitypes.NetworkResource, error)
GetNetworks() ([]apitypes.NetworkResource, error)
RemoveNetwork(input string) error
}