tianxiaoliang commented on a change in pull request #732: URL: https://github.com/apache/servicecomb-service-center/pull/732#discussion_r514656930
########## File path: etc/conf/app.yaml ########## @@ -0,0 +1,31 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +server: Review comment: 这个server的作用是什么 ########## File path: server/config/config.go ########## @@ -57,9 +56,32 @@ var ServerInfo = NewServerInformation() func GetGov() Gov { return Configurations.Gov } + +//GetServer return the http server configs +func GetServer() ServerConfig { + return Configurations.Server.Config +} + +//GetSsl return the ssl configs +func GetSsl() ServerConfig { Review comment: SSL全大写 ########## File path: server/config/config.go ########## @@ -57,9 +56,32 @@ var ServerInfo = NewServerInformation() func GetGov() Gov { return Configurations.Gov } + +//GetServer return the http server configs +func GetServer() ServerConfig { + return Configurations.Server.Config +} + +//GetSsl return the ssl configs +func GetSsl() ServerConfig { + return Configurations.Server.Config +} + +//GetLog return the log configs +func GetLog() ServerConfig { + return Configurations.Server.Config +} + +//GetRegistry return the registry configs +func GetRegistry() ServerConfig { + return Configurations.Server.Config +} + func Init() { + setCPUs() + err := archaius.Init(archaius.WithMemorySource(), archaius.WithENVSource(), - archaius.WithOptionalFiles([]string{""})) + archaius.WithOptionalFiles([]string{filepath.Join(util.GetAppRoot(), "conf", "app.yaml")})) Review comment: 既然如此就把cli接受的文件删掉吧,都用这个 ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
