// DiscoverNew is a notification for a new discovery event, such as a new node joining a cluster
DiscoverNew is a notification for a new discovery event, such as a new node joining a cluster
// DiscoverNew is a notification for a new discovery event such as a new node joining a cluster
func (d *driver) DiscoverNew(dType driverapi.DiscoveryType, data interface{}) error {
	if dType == driverapi.NodeDiscovery {
		nodeData, ok := data.(driverapi.NodeDiscoveryData)
		if !ok || nodeData.Address == "" {
			return fmt.Errorf("invalid discovery data")
		}
		d.nodeJoin(nodeData.Address, nodeData.Self)
	}
	return nil
}
func ( d * driver ) DiscoverNew ( dType driverapi . DiscoveryType , data interface { } ) error { if dType == driverapi . NodeDiscovery { nodeData , ok := data . ( driverapi . NodeDiscoveryData ) if ! ok || nodeData . Address == " " { return fmt . Errorf ( " " ) } d . nodeJoin ( nodeData . Address , nodeData . Self ) } return nil }
DiscoverNew is a notification for a new discovery event, such as a new node joining a cluster
DiscoverNew is a notification for a new discovery event such as a new node joining a cluster