AlexStocks commented on a change in pull request #52:
URL: https://github.com/apache/dubbo-go-samples/pull/52#discussion_r587585084
##########
File path: helloworld/README.md
##########
@@ -0,0 +1,135 @@
+## Hello World Example
+
+### Configuration
+
+registy config
+
+```yaml
+# registry config
+registries:
+ "demoZk":
+ protocol: "zookeeper"
+ timeout: "3s"
+ address: "127.0.0.1:2181"
+
+```
+
+provider config
+
+```yaml
+# service config
+services:
+ # Reference ID
+ "UserProvider":
+ registry: "demoZk"
+ protocol: "dubbo"
+ interface: "org.apache.dubbo.UserProvider"
+ cluster: "failover"
+ methods:
+ - name: "GetUser"
+ retries: 1
+```
+
+consumer config
+
+```yaml
+# reference config
+references:
+ # Reference ID
+ "UserProvider":
+ registry: "demoZk"
+ protocol: "dubbo"
+ interface: "org.apache.dubbo.UserProvider"
+ cluster: "failover"
+ methods:
+ - name: "GetUser"
+ retries: 3
+```
+
+### Code
+
+provider
+
+```go
+// init
+func init() {
+ config.SetProviderService(new(UserProvider))
+ // ------for hessian2------
+ hessian.RegisterPOJO(&User{})
+}
+
+// define dto
+type User struct {
+ Id string
Review comment:
Id -> ID
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]