mirror of
https://github.com/duanhf2012/origin.git
synced 2026-03-06 22:27:36 +08:00
优化服务模板的配置读取
This commit is contained in:
@@ -325,6 +325,10 @@ func (cls *Cluster) readLocalService(localNodeId string) error {
|
|||||||
//保存公共配置
|
//保存公共配置
|
||||||
for _, s := range cls.localNodeInfo.ServiceList {
|
for _, s := range cls.localNodeInfo.ServiceList {
|
||||||
for {
|
for {
|
||||||
|
splitServiceName := strings.Split(s,":")
|
||||||
|
if len(splitServiceName) == 2 {
|
||||||
|
s = splitServiceName[0]
|
||||||
|
}
|
||||||
//取公共服务配置
|
//取公共服务配置
|
||||||
pubCfg, ok := serviceConfig[s]
|
pubCfg, ok := serviceConfig[s]
|
||||||
if ok == true {
|
if ok == true {
|
||||||
@@ -355,6 +359,11 @@ func (cls *Cluster) readLocalService(localNodeId string) error {
|
|||||||
|
|
||||||
//组合所有的配置
|
//组合所有的配置
|
||||||
for _, s := range cls.localNodeInfo.ServiceList {
|
for _, s := range cls.localNodeInfo.ServiceList {
|
||||||
|
splitServiceName := strings.Split(s,":")
|
||||||
|
if len(splitServiceName) == 2 {
|
||||||
|
s = splitServiceName[0]
|
||||||
|
}
|
||||||
|
|
||||||
//先从NodeService中找
|
//先从NodeService中找
|
||||||
var serviceCfg interface{}
|
var serviceCfg interface{}
|
||||||
var ok bool
|
var ok bool
|
||||||
|
|||||||
Reference in New Issue
Block a user