FinalT commented on code in PR #709: URL: https://github.com/apache/dubbo-go-samples/pull/709#discussion_r1520729560
########## config_center/zookeeper/proto/greet.proto: ########## @@ -0,0 +1,34 @@ +/* + * 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. + */ + +syntax = "proto3"; + +package greet; + +option go_package = "github.com/apache/dubbo-go-samples/context/proto;greet"; Review Comment: ```suggestion option go_package = "github.com/apache/dubbo-go-samples/config_center/zookeeper/proto;greet"; ``` ########## config_center/nacos/README_zn.md: ########## @@ -0,0 +1,70 @@ +# Dubbo-go Config-Center Sample + +## 1. 介绍 + +This example shows dubbo-go's dynamic configuration feature with Nacos as config-center. Review Comment: Please use Chinese ########## integrate_test/helloworld/tests/integration/main_test.go: ########## @@ -18,13 +18,11 @@ package integration import ( + "dubbo.apache.org/dubbo-go/v3/client" + greet "github.com/apache/dubbo-go-samples/helloworld/proto" "os" "testing" - greet "github.com/apache/dubbo-go-samples/helloworld/proto" - - "dubbo.apache.org/dubbo-go/v3/client" - _ "dubbo.apache.org/dubbo-go/v3/imports" ) Review Comment: plz format imports ########## config_center/nacos/proto/greet.proto: ########## @@ -0,0 +1,34 @@ +/* + * 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. + */ + +syntax = "proto3"; + +package greet; + +option go_package = "github.com/apache/dubbo-go-samples/context/proto;greet"; Review Comment: ```suggestion option go_package = "github.com/apache/dubbo-go-samples/config_center/nacos/proto;greet"; ``` ########## config_center/zookeeper/README_zn.md: ########## @@ -0,0 +1,70 @@ +# Dubbo-go Config-Center Sample + +## 1. 介绍 + +This example shows dubbo-go's dynamic configuration feature with Zookeeper as config-center. Review Comment: Please use Chinese ########## config_center/nacos/README_zn.md: ########## @@ -0,0 +1,70 @@ +# Dubbo-go Config-Center Sample + +## 1. 介绍 + +This example shows dubbo-go's dynamic configuration feature with Nacos as config-center. + +## 2. 如何运行 + +### 把配置文件配置到nacos中 + +```yaml +dubbo: + registries: + demoZK: + protocol: zookeeper + timeout: 3s + address: '127.0.0.1:2181' + protocols: + triple: + name: tri + port: 20000 + provider: + services: + GreeterProvider: + interface: com.apache.dubbo.sample.basic.IGreeter +``` + +Open `https://localhost:8848/nacos/` with browser, make sure the relevant configuration is already in place in nacos. Review Comment: ditto. ########## config_center/zookeeper/README_zn.md: ########## @@ -0,0 +1,70 @@ +# Dubbo-go Config-Center Sample + +## 1. 介绍 + +This example shows dubbo-go's dynamic configuration feature with Zookeeper as config-center. + +## 2. 如何运行 + +### 把配置文件配置到zookeeper中 + +```yaml +dubbo: + registries: + demoZK: + protocol: zookeeper + timeout: 3s + address: '127.0.0.1:2181' + protocols: + triple: + name: tri + port: 20000 + provider: + services: + GreeterProvider: + interface: com.apache.dubbo.sample.basic.IGreeter +``` + +Open the local zookeeper client to see if the configuration is successful Review Comment: ditto. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
