mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
优化origin服务发现
This commit is contained in:
@@ -160,6 +160,12 @@ func (dc *OriginDiscoveryMaster) OnNatsDisconnect(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (ds *OriginDiscoveryMaster) OnNodeConnected(nodeId string) {
|
func (ds *OriginDiscoveryMaster) OnNodeConnected(nodeId string) {
|
||||||
|
var notifyDiscover rpc.SubscribeDiscoverNotify
|
||||||
|
notifyDiscover.IsFull = true
|
||||||
|
notifyDiscover.NodeInfo = ds.nodeInfo
|
||||||
|
notifyDiscover.MasterNodeId = cluster.GetLocalNodeInfo().NodeId
|
||||||
|
|
||||||
|
ds.GoNode(nodeId, SubServiceDiscover, ¬ifyDiscover)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ds *OriginDiscoveryMaster) OnNodeDisconnect(nodeId string) {
|
func (ds *OriginDiscoveryMaster) OnNodeDisconnect(nodeId string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user