dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] chickenlj commented on a change in pull request #2160: [Dubbo-2030] A basically running demo implementation for introducing dynamic configuration to Dubbo.
Date Mon, 06 Aug 2018 01:43:37 GMT
chickenlj commented on a change in pull request #2160: [Dubbo-2030] A basically running demo
implementation for introducing dynamic configuration to Dubbo.
URL: https://github.com/apache/incubator-dubbo/pull/2160#discussion_r207758715
 
 

 ##########
 File path: dubbo-config/dubbo-config-dynamic/src/main/java/org/apache/dubbo/config/dynamic/support/apollo/ApolloDynamicConfiguration.java
 ##########
 @@ -0,0 +1,134 @@
+/*
+ * 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.
+ */
+package org.apache.dubbo.config.dynamic.support.apollo;
+
+import com.ctrip.framework.apollo.Config;
+import com.ctrip.framework.apollo.ConfigChangeListener;
+import com.ctrip.framework.apollo.ConfigService;
+import com.ctrip.framework.apollo.enums.PropertyChangeType;
+import com.ctrip.framework.apollo.model.ConfigChange;
+import com.ctrip.framework.apollo.model.ConfigChangeEvent;
+import org.apache.dubbo.common.Constants;
+import org.apache.dubbo.common.URL;
+import org.apache.dubbo.config.dynamic.AbstractDynamicConfiguration;
+import org.apache.dubbo.config.dynamic.ConfigChangeType;
+import org.apache.dubbo.config.dynamic.ConfigType;
+import org.apache.dubbo.config.dynamic.ConfigurationListener;
+
+/**
+ *
+ */
+public class ApolloDynamicConfiguration extends AbstractDynamicConfiguration {
+    private static final String APOLLO_ENV_KEY = "env";
+    // FIXME the key?
+    private static final String APOLLO_ADDR_KEY = "";
+    private static final String APOLLO_CLUSTER_KEY = "apollo.cluster";
+    /**
+     * support two namespaces: application -> dubbo
+     */
+    private Config dubboConfig;
+    private Config appConfig;
 
 Review comment:
   I think it's great. Will it be a feature like the CompositeConfiguration in [commons-configuration](https://commons.apache.org/proper/commons-configuration/userguide_v1.10/howto_compositeconfiguration.html#Composite_Configuration_Details)?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Mime
View raw message