2018-02-05 16:05:59 -05:00
|
|
|
package daemon // import "github.com/docker/docker/daemon"
|
2016-10-18 00:36:52 -04:00
|
|
|
|
|
|
|
import (
|
|
|
|
apitypes "github.com/docker/docker/api/types"
|
2018-05-23 10:03:02 -04:00
|
|
|
"github.com/docker/docker/api/types/filters"
|
2017-04-30 17:51:43 -04:00
|
|
|
lncluster "github.com/docker/libnetwork/cluster"
|
2016-10-18 00:36:52 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// 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
|
2017-04-30 17:51:43 -04:00
|
|
|
SendClusterEvent(event lncluster.ConfigEventType)
|
2017-03-28 06:46:26 -04: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 00:36:52 -04:00
|
|
|
GetNetwork(input string) (apitypes.NetworkResource, error)
|
2018-05-23 10:03:02 -04:00
|
|
|
GetNetworks(filters.Args) ([]apitypes.NetworkResource, error)
|
2016-10-18 00:36:52 -04:00
|
|
|
RemoveNetwork(input string) error
|
|
|
|
}
|