mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
5fff515028
In order to vendor-in libnetwork to docker, we need to remove the swarm dependency even though it is used as library. using this PR, a new build flag libnetwork_discovery is introduced in order to avoid pulling in the unused hostdiscovery functionality into docker. We are working with the Swarm project to see if we can modularize the discovery package to become independent so that we can include them as a vendor-in package in docker. Signed-off-by: Madhu Venugopal <madhu@docker.com>
28 lines
556 B
Go
28 lines
556 B
Go
// +build !libnetwork_discovery
|
|
|
|
package hostdiscovery
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/docker/libnetwork/config"
|
|
)
|
|
|
|
type hostDiscovery struct{}
|
|
|
|
// NewHostDiscovery function creates a host discovery object
|
|
func NewHostDiscovery() HostDiscovery {
|
|
return &hostDiscovery{}
|
|
}
|
|
|
|
func (h *hostDiscovery) StartDiscovery(cfg *config.ClusterCfg, joinCallback JoinCallback, leaveCallback LeaveCallback) error {
|
|
return nil
|
|
}
|
|
|
|
func (h *hostDiscovery) StopDiscovery() error {
|
|
return nil
|
|
}
|
|
|
|
func (h *hostDiscovery) Fetch() ([]net.IP, error) {
|
|
return []net.IP{}, nil
|
|
}
|