You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/10 11:52:09 UTC

[GitHub] [dubbo-go-samples] PhilYue opened a new pull request #242: Ftr/JsonRPC using dubbogo config

PhilYue opened a new pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242


   PR Desc:
   
   JsonRPC sample use the Dubbogo config
   fix Dubbo of java Project, add Quickstart
   add README
   add integrate test


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] PhilYue commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
PhilYue commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r711558903



##########
File path: rpc/jsonrpc/go-server/conf/dubbogo.yml
##########
@@ -0,0 +1,66 @@
+dubbo:
+  application:
+    organization: "dubbo.apache.org"
+    name: "UserInfoServer"
+    module: "dubbo-go user-info server"
+    version: "0.0.1"
+    environment: "dev"
+  registries:
+    "hangzhouzk":
+      protocol: "zookeeper"
+      timeout: "3s"
+      address: "127.0.0.1:2181"
+      username: ""
+      password: ""
+    "shanghaizk":

Review comment:
       get




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] AlexStocks commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r707008706



##########
File path: rpc/jsonrpc/README.md
##########
@@ -0,0 +1,66 @@
+# JsonRPC Example
+
+## Backend
+Dubbo3 provides Triple(Dubbo3), Dubbo2 protocols, which are native to the Dubbo framework.

Review comment:
       Dubbo3 provides Triple(Dubbo3) and Dubbo2 protocols, which are native to the Dubbo framework.
   In addition, Dubbo3 also integrates a number of third-party protocols into Dubbo's programming and service governance architecture, including gRPC, Thrift, **JsonRPC**, Hessian2, and REST. The following describes the **JsonRPC** protocol example.
   




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] PhilYue commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
PhilYue commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r711542964



##########
File path: rpc/jsonrpc/go-client/conf/dubbogo.yml
##########
@@ -0,0 +1,49 @@
+dubbo:
+  application:
+    organization: "dubbo.apache.org"
+    name: "UserInfoServer"
+    module: "dubbo-go user-info client"
+    version: "0.0.1"
+    environment: "dev"
+  registries:
+    "hangzhouzk":
+      protocol: "zookeeper"
+      timeout: "3s"
+      address: "127.0.0.1:2181"
+      username: ""
+      password: ""
+    "shanghaizk":

Review comment:
       嗯呢,起初我看 Java 这边也是两个 注册中心,虽然也只用了 “2181”,就暂时没动它,我觉得可以先去了,样例代码还是清晰简单点好




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] AlexStocks merged pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242


   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] LaurenceLiZhixin commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
LaurenceLiZhixin commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r707156625



##########
File path: rpc/jsonrpc/go-client/pkg/user.go
##########
@@ -34,48 +34,48 @@ type JsonRPCUser struct {
 func (u JsonRPCUser) String() string {
 	return fmt.Sprintf(
 		"User{ID:%s, Name:%s, Age:%d, Time:%s, Sex:%s}",
-		u.ID, u.Name, u.Age, time.Unix(u.Time, 0).Format("2006-01-02 15:04:05.99999"), u.Sex,
+		u.ID, u.Name, u.Age, time.Unix(int64(u.Time), 0).Format("2006-01-02 15:04:05.99999"), u.Sex,
 	)
 }
 
 type UserProvider struct {
-	GetUsers func(req []interface{}) ([]JsonRPCUser, error)
-	GetUser  func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error
-	GetUser0 func(id string, name string) (JsonRPCUser, error)
-	GetUser1 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error
-	GetUser2 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error `dubbo:"getUser"`
+	GetUsers func(ids []interface{}) ([]*JsonRPCUser, error)
+	GetUser  func(ctx context.Context, id string) (*JsonRPCUser, error)
+	GetUser0 func(id string, name string) (*JsonRPCUser, error)
+	GetUser1 func(ctx context.Context, id string) (*JsonRPCUser, error)
+	GetUser2 func(ctx context.Context, id string) (*JsonRPCUser, error) `dubbo:"getUser"`
 	GetUser3 func() error
-	Echo     func(ctx context.Context, req interface{}) (interface{}, error) // Echo represent EchoFilter will be used
+	Echo     func(ctx context.Context, req string) (string, error) // Echo represent EchoFilter will be used
 }
 
 func (u *UserProvider) Reference() string {
-	return "UserProvider"
+	return "com.ikurento.user.UserProvider"
 }
 
 type UserProvider1 struct {
-	GetUsers func(req []interface{}) ([]JsonRPCUser, error)
-	GetUser  func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error
-	GetUser0 func(id string, name string) (JsonRPCUser, error)
-	GetUser1 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error
-	GetUser2 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error `dubbo:"getUser"`
+	GetUsers func(ids []interface{}) ([]*JsonRPCUser, error)
+	GetUser  func(ctx context.Context, id string) (*JsonRPCUser, error)
+	GetUser0 func(id string, name string) (*JsonRPCUser, error)
+	GetUser1 func(ctx context.Context, id string) (*JsonRPCUser, error)
+	GetUser2 func(ctx context.Context, id string) (*JsonRPCUser, error) `dubbo:"getUser"`
 	GetUser3 func() error
-	Echo     func(ctx context.Context, req interface{}) (interface{}, error) // Echo represent EchoFilter will be used
+	Echo     func(ctx context.Context, req string) (string, error) // Echo represent EchoFilter will be used
 }
 
 func (u *UserProvider1) Reference() string {
-	return "UserProvider1"
+	return "com.ikurento.user.UserProvider1"
 }
 
 type UserProvider2 struct {
-	GetUsers func(req []interface{}) ([]JsonRPCUser, error)
-	GetUser  func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error
-	GetUser0 func(id string, name string) (JsonRPCUser, error)
-	GetUser1 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error
-	GetUser2 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error `dubbo:"getUser"`
+	GetUsers func(ids []interface{}) ([]*JsonRPCUser, error)
+	GetUser  func(ctx context.Context, id string) (*JsonRPCUser, error)
+	GetUser0 func(id string, name string) (*JsonRPCUser, error)
+	GetUser1 func(ctx context.Context, id string) (*JsonRPCUser, error)
+	GetUser2 func(ctx context.Context, id string) (*JsonRPCUser, error) `dubbo:"getUser"`
 	GetUser3 func() error
-	Echo     func(ctx context.Context, req interface{}) (interface{}, error) // Echo represent EchoFilter will be used
+	Echo     func(ctx context.Context, req string) (string, error) // Echo represent EchoFilter will be used
 }
 
 func (u *UserProvider2) Reference() string {

Review comment:
       Reference 我们全部删掉,在配置文件中,配置UserProvider2,替换原来的Reference




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] zouyx commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r707022535



##########
File path: rpc/jsonrpc/README.md
##########
@@ -0,0 +1,66 @@
+# JsonRPC Example
+
+## Backend
+Dubbo3 provides Triple(Dubbo3), Dubbo2 protocols, which are native to the Dubbo framework.

Review comment:
       I think [JSON](https://baike.baidu.com/item/JSON/2462549) RPC is right ,rather than JsonRPC




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] PhilYue commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
PhilYue commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r711525567



##########
File path: rpc/jsonrpc/go-client/conf/dubbogo.yml
##########
@@ -0,0 +1,49 @@
+dubbo:
+  application:
+    organization: "dubbo.apache.org"
+    name: "UserInfoServer"
+    module: "dubbo-go user-info client"
+    version: "0.0.1"
+    environment: "dev"
+  registries:
+    "hangzhouzk":
+      protocol: "zookeeper"
+      timeout: "3s"
+      address: "127.0.0.1:2181"
+      username: ""
+      password: ""
+    "shanghaizk":

Review comment:
       get




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] LaurenceLiZhixin commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
LaurenceLiZhixin commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r707157178



##########
File path: rpc/jsonrpc/go-server/docker/docker-compose.yml
##########
@@ -0,0 +1,16 @@
+version: '3'

Review comment:
       docker-compose 和heathcheck.sh已经不需要了,删掉就行了




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] PhilYue commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
PhilYue commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r711750217



##########
File path: integrate_test/rpc/jsonrpc/tests/integration/main_test.go
##########
@@ -0,0 +1,54 @@
+/*
+ * 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 integration
+
+import (
+	"os"
+	"testing"
+	"time"
+)
+
+import (
+	_ "dubbo.apache.org/dubbo-go/v3/common/logger"
+	"dubbo.apache.org/dubbo-go/v3/config"
+	_ "dubbo.apache.org/dubbo-go/v3/imports"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/rpc/jsonrpc/go-client/pkg"
+)
+
+var (
+	userProvider  = new(pkg.UserProvider)

Review comment:
       PR Log 👍 👍 
   - fix the way of init struct,  `new ` change to `&struct`




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] AlexStocks commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r711671154



##########
File path: integrate_test/rpc/jsonrpc/tests/integration/main_test.go
##########
@@ -0,0 +1,54 @@
+/*
+ * 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 integration
+
+import (
+	"os"
+	"testing"
+	"time"
+)
+
+import (
+	_ "dubbo.apache.org/dubbo-go/v3/common/logger"
+	"dubbo.apache.org/dubbo-go/v3/config"
+	_ "dubbo.apache.org/dubbo-go/v3/imports"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/rpc/jsonrpc/go-client/pkg"
+)
+
+var (
+	userProvider  = new(pkg.UserProvider)

Review comment:
       pls do not use new.




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] LaurenceLiZhixin commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
LaurenceLiZhixin commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r707156906



##########
File path: rpc/jsonrpc/go-server/conf/dubbogo.yml
##########
@@ -0,0 +1,66 @@
+dubbo:
+  application:
+    organization: "dubbo.apache.org"
+    name: "UserInfoServer"
+    module: "dubbo-go user-info server"
+    version: "0.0.1"
+    environment: "dev"
+  registries:
+    "hangzhouzk":
+      protocol: "zookeeper"
+      timeout: "3s"
+      address: "127.0.0.1:2181"
+      username: ""
+      password: ""
+    "shanghaizk":

Review comment:
       shanghaizk全部删掉




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] AlexStocks commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r707008350



##########
File path: rpc/jsonrpc/README.md
##########
@@ -0,0 +1,66 @@
+# JsonRPC Example
+
+## Backend

Review comment:
       不要吝啬空格、空行。




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] LaurenceLiZhixin commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
LaurenceLiZhixin commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r707156217



##########
File path: rpc/jsonrpc/go-client/conf/dubbogo.yml
##########
@@ -0,0 +1,49 @@
+dubbo:
+  application:
+    organization: "dubbo.apache.org"
+    name: "UserInfoServer"
+    module: "dubbo-go user-info client"
+    version: "0.0.1"
+    environment: "dev"
+  registries:
+    "hangzhouzk":
+      protocol: "zookeeper"
+      timeout: "3s"
+      address: "127.0.0.1:2181"
+      username: ""
+      password: ""
+    "shanghaizk":

Review comment:
       shanghaizk没用到可以直接删掉了




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] PhilYue commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
PhilYue commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r711525414



##########
File path: rpc/jsonrpc/README.md
##########
@@ -0,0 +1,66 @@
+# JsonRPC Example
+
+## Backend

Review comment:
       收




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] PhilYue commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
PhilYue commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r711556184



##########
File path: rpc/jsonrpc/go-client/pkg/user.go
##########
@@ -34,48 +34,48 @@ type JsonRPCUser struct {
 func (u JsonRPCUser) String() string {
 	return fmt.Sprintf(
 		"User{ID:%s, Name:%s, Age:%d, Time:%s, Sex:%s}",
-		u.ID, u.Name, u.Age, time.Unix(u.Time, 0).Format("2006-01-02 15:04:05.99999"), u.Sex,
+		u.ID, u.Name, u.Age, time.Unix(int64(u.Time), 0).Format("2006-01-02 15:04:05.99999"), u.Sex,
 	)
 }
 
 type UserProvider struct {
-	GetUsers func(req []interface{}) ([]JsonRPCUser, error)
-	GetUser  func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error
-	GetUser0 func(id string, name string) (JsonRPCUser, error)
-	GetUser1 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error
-	GetUser2 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error `dubbo:"getUser"`
+	GetUsers func(ids []interface{}) ([]*JsonRPCUser, error)
+	GetUser  func(ctx context.Context, id string) (*JsonRPCUser, error)
+	GetUser0 func(id string, name string) (*JsonRPCUser, error)
+	GetUser1 func(ctx context.Context, id string) (*JsonRPCUser, error)
+	GetUser2 func(ctx context.Context, id string) (*JsonRPCUser, error) `dubbo:"getUser"`
 	GetUser3 func() error
-	Echo     func(ctx context.Context, req interface{}) (interface{}, error) // Echo represent EchoFilter will be used
+	Echo     func(ctx context.Context, req string) (string, error) // Echo represent EchoFilter will be used
 }
 
 func (u *UserProvider) Reference() string {
-	return "UserProvider"
+	return "com.ikurento.user.UserProvider"
 }
 
 type UserProvider1 struct {
-	GetUsers func(req []interface{}) ([]JsonRPCUser, error)
-	GetUser  func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error
-	GetUser0 func(id string, name string) (JsonRPCUser, error)
-	GetUser1 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error
-	GetUser2 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error `dubbo:"getUser"`
+	GetUsers func(ids []interface{}) ([]*JsonRPCUser, error)
+	GetUser  func(ctx context.Context, id string) (*JsonRPCUser, error)
+	GetUser0 func(id string, name string) (*JsonRPCUser, error)
+	GetUser1 func(ctx context.Context, id string) (*JsonRPCUser, error)
+	GetUser2 func(ctx context.Context, id string) (*JsonRPCUser, error) `dubbo:"getUser"`
 	GetUser3 func() error
-	Echo     func(ctx context.Context, req interface{}) (interface{}, error) // Echo represent EchoFilter will be used
+	Echo     func(ctx context.Context, req string) (string, error) // Echo represent EchoFilter will be used
 }
 
 func (u *UserProvider1) Reference() string {
-	return "UserProvider1"
+	return "com.ikurento.user.UserProvider1"
 }
 
 type UserProvider2 struct {
-	GetUsers func(req []interface{}) ([]JsonRPCUser, error)
-	GetUser  func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error
-	GetUser0 func(id string, name string) (JsonRPCUser, error)
-	GetUser1 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error
-	GetUser2 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser) error `dubbo:"getUser"`
+	GetUsers func(ids []interface{}) ([]*JsonRPCUser, error)
+	GetUser  func(ctx context.Context, id string) (*JsonRPCUser, error)
+	GetUser0 func(id string, name string) (*JsonRPCUser, error)
+	GetUser1 func(ctx context.Context, id string) (*JsonRPCUser, error)
+	GetUser2 func(ctx context.Context, id string) (*JsonRPCUser, error) `dubbo:"getUser"`
 	GetUser3 func() error
-	Echo     func(ctx context.Context, req interface{}) (interface{}, error) // Echo represent EchoFilter will be used
+	Echo     func(ctx context.Context, req string) (string, error) // Echo represent EchoFilter will be used
 }
 
 func (u *UserProvider2) Reference() string {

Review comment:
       get




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] PhilYue commented on a change in pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
PhilYue commented on a change in pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#discussion_r711540016



##########
File path: rpc/jsonrpc/README.md
##########
@@ -0,0 +1,66 @@
+# JsonRPC Example
+
+## Backend
+Dubbo3 provides Triple(Dubbo3), Dubbo2 protocols, which are native to the Dubbo framework.

Review comment:
       yep, using JSON-RPC




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [dubbo-go-samples] PhilYue commented on pull request #242: Ftr/JsonRPC using dubbogo config

Posted by GitBox <gi...@apache.org>.
PhilYue commented on pull request #242:
URL: https://github.com/apache/dubbo-go-samples/pull/242#issuecomment-922242572


   PR log
   update: fix and clean code
   - fix JsonRPC -> JSON-RPC
   - del jsonrpc docker dir of test package
   - del registry of `shanghaizk` zk
   - fix rm func Reference(), and config by dubbogo.yml
   
   Go-client with Java’s Provider connection is success


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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