mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-16 09:17:40 +08:00
1.优化CALL Rpc错误返回
2.优化不同邻居Master服务发现规则
This commit is contained in:
@@ -150,6 +150,7 @@ func (cls *Cluster) delServiceNode(serviceName string,nodeId int){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func (cls *Cluster) serviceDiscoverySetNodeInfo (nodeInfo *NodeInfo){
|
||||
//本地结点不加入
|
||||
if nodeInfo.NodeId == cls.localNodeInfo.NodeId {
|
||||
@@ -272,6 +273,10 @@ func (cls *Cluster) GetMasterDiscoveryNodeInfo(nodeId int) *NodeInfo{
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cls *Cluster) IsMasterDiscoveryNode() bool{
|
||||
return cls.GetMasterDiscoveryNodeInfo(cls.GetLocalNodeInfo().NodeId)!=nil
|
||||
}
|
||||
|
||||
func (cls *Cluster) SetupServiceDiscovery(localNodeId int,setupServiceFun SetupServiceFun) {
|
||||
if cls.serviceDiscovery!=nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user