mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
新增全局配置
This commit is contained in:
@@ -41,8 +41,9 @@ type NodeRpcInfo struct {
|
||||
var cluster Cluster
|
||||
|
||||
type Cluster struct {
|
||||
localNodeInfo NodeInfo //本结点配置信息
|
||||
masterDiscoveryNodeList []NodeInfo //配置发现Master结点
|
||||
localNodeInfo NodeInfo //本结点配置信息
|
||||
masterDiscoveryNodeList []NodeInfo //配置发现Master结点
|
||||
globalCfg interface{} //全局配置
|
||||
|
||||
localServiceCfg map[string]interface{} //map[serviceName]配置数据*
|
||||
mapRpc map[int]NodeRpcInfo //nodeId
|
||||
@@ -418,3 +419,7 @@ func HasService(nodeId int, serviceName string) bool {
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func (cls *Cluster) GetGlobalCfg() interface{} {
|
||||
return cls.globalCfg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user