mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-12 06:11:03 -04:00
27 lines
707 B
Go
27 lines
707 B
Go
![]() |
package daemon
|
||
|
|
||
|
import (
|
||
|
apitypes "github.com/docker/docker/api/types"
|
||
|
lncluster "github.com/docker/libnetwork/cluster"
|
||
|
)
|
||
|
|
||
|
// Cluster is the interface for github.com/docker/docker/daemon/cluster.(*Cluster).
|
||
|
type Cluster interface {
|
||
|
ClusterStatus
|
||
|
NetworkManager
|
||
|
SendClusterEvent(event lncluster.ConfigEventType)
|
||
|
}
|
||
|
|
||
|
// 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
|
||
|
}
|