|
@@ -25,31 +25,6 @@ import (
|
|
|
"github.com/docker/docker/pkg/stringid"
|
|
|
)
|
|
|
|
|
|
-// NetworkInfo returns some configuration and operational information about the network
|
|
|
-type NetworkInfo interface {
|
|
|
- IpamConfig() (string, map[string]string, []*IpamConf, []*IpamConf)
|
|
|
- IpamInfo() ([]*IpamInfo, []*IpamInfo)
|
|
|
- DriverOptions() map[string]string
|
|
|
- Scope() string
|
|
|
- IPv6Enabled() bool
|
|
|
- Internal() bool
|
|
|
- Attachable() bool
|
|
|
- Ingress() bool
|
|
|
- ConfigFrom() string
|
|
|
- ConfigOnly() bool
|
|
|
- Labels() map[string]string
|
|
|
- Dynamic() bool
|
|
|
- Created() time.Time
|
|
|
- // Peers returns a slice of PeerInfo structures which has the information about the peer
|
|
|
- // nodes participating in the same overlay network. This is currently the per-network
|
|
|
- // gossip cluster. For non-dynamic overlay networks and bridge networks it returns an
|
|
|
- // empty slice
|
|
|
- Peers() []networkdb.PeerInfo
|
|
|
- // Services returns a map of services keyed by the service name with the details
|
|
|
- // of all the tasks that belong to the service. Applicable only in swarm mode.
|
|
|
- Services() map[string]ServiceInfo
|
|
|
-}
|
|
|
-
|
|
|
// EndpointWalker is a client provided function which will be used to walk the Endpoints.
|
|
|
// When the function returns true, the walk will stop.
|
|
|
type EndpointWalker func(ep *Endpoint) bool
|
|
@@ -1772,11 +1747,10 @@ func (n *Network) deriveAddressSpace() (string, error) {
|
|
|
return local, nil
|
|
|
}
|
|
|
|
|
|
-// Info returns certain operational data belonging to this network.
|
|
|
-func (n *Network) Info() NetworkInfo {
|
|
|
- return n
|
|
|
-}
|
|
|
-
|
|
|
+// Peers returns a slice of PeerInfo structures which has the information about the peer
|
|
|
+// nodes participating in the same overlay network. This is currently the per-network
|
|
|
+// gossip cluster. For non-dynamic overlay networks and bridge networks it returns an
|
|
|
+// empty slice
|
|
|
func (n *Network) Peers() []networkdb.PeerInfo {
|
|
|
if !n.Dynamic() {
|
|
|
return []networkdb.PeerInfo{}
|