From 8f4f85dd5b5b6b7268428b8f95f56c1ba8608ac3 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 28 Mar 2017 12:46:26 +0200 Subject: [PATCH] Add NetworkManager and ClusterStatus interfaces Signed-off-by: Sebastiaan van Stijn --- daemon/cluster.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/daemon/cluster.go b/daemon/cluster.go index 98b2aa1e04..b7970edbb5 100644 --- a/daemon/cluster.go +++ b/daemon/cluster.go @@ -6,6 +6,18 @@ import ( // 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