2018-02-05 21:05:59 +00:00
|
|
|
package daemon // import "github.com/docker/docker/daemon"
|
2016-10-18 04:36:52 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
apitypes "github.com/docker/docker/api/types"
|
2018-05-23 14:03:02 +00:00
|
|
|
"github.com/docker/docker/api/types/filters"
|
2021-04-06 00:24:47 +00:00
|
|
|
lncluster "github.com/docker/docker/libnetwork/cluster"
|
2016-10-18 04:36:52 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Cluster is the interface for github.com/docker/docker/daemon/cluster.(*Cluster).
|
|
|
|
type Cluster interface {
|
2017-03-28 10:46:26 +00:00
|
|
|
ClusterStatus
|
|
|
|
NetworkManager
|
2017-04-30 21:51:43 +00:00
|
|
|
SendClusterEvent(event lncluster.ConfigEventType)
|
2017-03-28 10:46:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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 04:36:52 +00:00
|
|
|
GetNetwork(input string) (apitypes.NetworkResource, error)
|
2018-05-23 14:03:02 +00:00
|
|
|
GetNetworks(filters.Args) ([]apitypes.NetworkResource, error)
|
2016-10-18 04:36:52 +00:00
|
|
|
RemoveNetwork(input string) error
|
|
|
|
}
|