You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/01/08 11:00:38 UTC

[GitHub] [servicecomb-service-center] little-cui commented on a change in pull request #1208: [feat] add datacenter info to instance from config

little-cui commented on a change in pull request #1208:
URL: https://github.com/apache/servicecomb-service-center/pull/1208#discussion_r780657403



##########
File path: etc/conf/app.yaml
##########
@@ -144,6 +144,10 @@ registry:
     # the allowable minimum value of instance heartbeat interval
     # if interval < minInterval, instance TTL still set with minInterval
     minInterval: 5s
+    datacenter:
+      name: dc1

Review comment:
       这些默认值都是空

##########
File path: server/config/config.go
##########
@@ -175,6 +175,10 @@ func loadServerConfig() ServerConfig {
 			GlobalVisible: GetString("registry.service.globalVisible", "", WithENV("CSE_SHARED_SERVICES")),
 			InstanceTTL:   GetInt64("registry.instance.ttl", 0, WithENV("INSTANCE_TTL")),
 
+			DataCenterName:          GetString("registry.instance.datacenter.name", "", WithENV("DATACENTER_NAME")),

Review comment:
       这些配置不是服务端配置,仅仅是实例注册的可选配置,不需要加到这个config中,在使用的地方直接config.GetString即可




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org