mirror of
https://github.com/clearlinux/libnetwork.git
synced 2026-09-03 20:31:30 +00:00
Integration with Docker Discovery
* integrated hostdiscovery package with the new Docker Discovery * Integrated hostdiscovery package with libnetwork core * removed libnetwork_discovery tag * Introduced driver apis for discovery events * moved overlay driver to make use of the discovery events * Using Docker Discovery service. * Changed integration-tests to make use of the new discovery Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
@@ -40,6 +40,12 @@ type Driver interface {
|
||||
// Leave method is invoked when a Sandbox detaches from an endpoint.
|
||||
Leave(nid, eid string) error
|
||||
|
||||
// DiscoverNew is a notification for a new discovery event, Example:a new node joining a cluster
|
||||
DiscoverNew(dType DiscoveryType, data interface{}) error
|
||||
|
||||
// DiscoverDelete is a notification for a discovery delete event, Example:a node leaving a cluster
|
||||
DiscoverDelete(dType DiscoveryType, data interface{}) error
|
||||
|
||||
// Type returns the the type of this driver, the network type this driver manages
|
||||
Type() string
|
||||
}
|
||||
@@ -106,3 +112,17 @@ type DriverCallback interface {
|
||||
type Capability struct {
|
||||
DataScope datastore.DataScope
|
||||
}
|
||||
|
||||
// DiscoveryType represents the type of discovery element the DiscoverNew function is invoked on
|
||||
type DiscoveryType int
|
||||
|
||||
const (
|
||||
// NodeDiscovery represents Node join/leave events provided by discovery
|
||||
NodeDiscovery = iota + 1
|
||||
)
|
||||
|
||||
// NodeDiscoveryData represents the structure backing the node discovery data json string
|
||||
type NodeDiscoveryData struct {
|
||||
Address string
|
||||
Self bool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user