Skip to content
Snippets Groups Projects
Commit ee672da5 authored by 邹毅贤's avatar 邹毅贤
Browse files

add new config item for apollo

parent 2f0e0361
No related branches found
No related tags found
No related merge requests found
......@@ -101,6 +101,7 @@ const (
const (
CONFIG_NAMESPACE_KEY = "config.namespace"
CONFIG_GROUP_KEY = "config.group"
CONFIG_APP_ID_KEY = "config.appId"
CONFIG_CLUSTER_KEY = "config.cluster"
CONFIG_CHECK_KEY = "config.check"
CONFIG_TIMEOUT_KET = "config.timeout"
......
......@@ -42,6 +42,7 @@ type ConfigCenterConfig struct {
ConfigFile string `default:"dubbo.properties" yaml:"config_file" json:"config_file,omitempty"`
Namespace string `default:"dubbo.properties" yaml:"namespace" json:"namespace,omitempty"`
AppConfigFile string `default:"dubbo.properties" yaml:"app_config_file" json:"app_config_file,omitempty"`
AppId string `default:"dubbo" yaml:"app_id" json:"app_id,omitempty"`
TimeoutStr string `yaml:"timeout" json:"timeout,omitempty"`
timeout time.Duration
}
......
......@@ -57,7 +57,7 @@ func newApolloConfiguration(url *common.URL) (*apolloConfiguration, error) {
configAddr := c.getAddressWithProtocolPrefix(url)
configCluster := url.GetParam(constant.CONFIG_CLUSTER_KEY, "")
appId := url.GetParam(constant.CONFIG_GROUP_KEY, DEFAULT_GROUP)
appId := url.GetParam(constant.CONFIG_APP_ID_KEY, "")
namespaces := url.GetParam(constant.CONFIG_NAMESPACE_KEY, getProperties(DEFAULT_GROUP))
c.appConf = &agollo.AppConfig{
AppId: appId,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment