mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
新增私有结点功能
This commit is contained in:
@@ -14,6 +14,7 @@ var configDir = "./config/"
|
||||
type NodeInfo struct {
|
||||
NodeId int
|
||||
NodeName string
|
||||
Private bool
|
||||
ListenAddr string
|
||||
ServiceList []string
|
||||
}
|
||||
@@ -81,7 +82,7 @@ func (cls *Cluster) delServiceNode(serviceName string,nodeId int){
|
||||
}
|
||||
|
||||
func (cls *Cluster) serviceDiscoverySetNodeInfo (nodeInfo *NodeInfo){
|
||||
if nodeInfo.NodeId == cls.localNodeInfo.NodeId {
|
||||
if nodeInfo.NodeId == cls.localNodeInfo.NodeId || len(nodeInfo.ServiceList)==0 || nodeInfo.Private == true {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user