Files
moby/daemon/cluster.go
Derek McGowan 7a720df61f Move libnetwork to daemon/libnetwork
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-14 09:25:23 -07:00

28 lines
760 B
Go

package daemon
import (
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/network"
lncluster "github.com/docker/docker/daemon/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) (network.Inspect, error)
GetNetworks(filters.Args) ([]network.Inspect, error)
RemoveNetwork(input string) error
}