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/07 16:09:12 UTC

[GitHub] [dubbo-go-samples] yaoyinnan opened a new pull request #230: Rft/add config enhance generic dubbo

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


   添加 generic dubbo 样例
   配置 .run 目录下 .xml 配置文件的环境变量和文件路径


-- 
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] xavier-niu commented on a change in pull request #230: Rft/add config enhance generic dubbo

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



##########
File path: start_integrate_test.sh
##########
@@ -93,18 +93,20 @@
 DOCKER_DIR=$(pwd)/integrate_test/dockercompose
 
 array=("helloworld")
-array+=("direct")
-# config-api
-array+=("config-api/rpc/triple")
-array+=("config-api/configcenter/nacos")
-array+=("config-api/configcenter/zookeeper")
-# registry
-array+=("registry/zookeeper")
-array+=("registry/nacos")
-# rpc
-array+=("rpc/triple/codec-extension")
-array+=("rpc/triple/hessian2")
-array+=("rpc/triple/pb/dubbogo-grpc")
+##array+=("direct")
+### config-api
+##array+=("config-api/rpc/triple")
+##array+=("config-api/configcenter/nacos")
+##array+=("config-api/configcenter/zookeeper")
+### registry
+##array+=("registry/zookeeper")
+##array+=("registry/nacos")
+### rpc
+#array+=("rpc/triple/codec-extension")
+#array+=("rpc/triple/hessian2")
+#array+=("rpc/triple/pb/dubbogo-grpc")
+## generic
+#array=("generic/dubbo")

Review comment:
       `generic/default` integrated test should be enabled by appending a line into `start_integrate_test.sh`:
   
   ```sh
   array+=("generic/default")
   ```




-- 
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] xavier-niu commented on a change in pull request #230: Rft/add config enhance generic dubbo

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



##########
File path: .run/generic-default-go-server.run.xml
##########
@@ -0,0 +1,14 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="generic-default-go-server" type="GoApplicationRunConfiguration" factoryName="Go Application" folderName="v3config-generic">
+    <module name="dubbo-go-samples" />
+    <working_directory value="$PROJECT_DIR$" />
+    <envs>
+      <env name="DUBBO_GO_CONFIG_PATH" value="$PROJECT_DIR$/generic/default/go-server/conf/dubbogo.yml" />
+    </envs>
+    <kind value="PACKAGE" />
+    <package value="github.com/apache/dubbo-go-samples/generic/default/go-server/cmd" />
+    <directory value="$PROJECT_DIR$/generic/dubbo/go-server/cmd" />

Review comment:
       dubbo是序列化方式… default 或者 map 是泛化方式,他们不是一个东西。。




-- 
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] yaoyinnan commented on pull request #230: Rft/add config enhance generic dubbo

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


   @LaurenceLiZhixin  Please approve running CI workflows.


-- 
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] xavier-niu commented on a change in pull request #230: Rft/add config enhance generic dubbo

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



##########
File path: generic/README.md
##########
@@ -4,61 +4,39 @@ Generic invocation is mainly used when the client does not have API interface or
 
 ## Getting Started
 
-You should provide the information of config for both provider and consumer, in this case, we use `default` directory as an example.
+### Instructions
 
-```shell
-export CONF_PROVIDER_FILE_PATH="$(pwd)/default/go-server/conf/server.yml"
-export CONF_CONSUMER_FILE_PATH="$(pwd)/default/go-client/conf/client.yml"
-```
+1. Start zookeeper
 
-ZooKeeper is required as well, you could launch it using docker-compose.
+   ```shell
+   cd ./default/go-server/docker \
+     && docker-compose up -d
+   ```
 
-```shell
-cd ./default/go-server/docker \
-  && docker-compose up -d
-```
+2. Start the server to run provider.
 
-### Map: Default Way
+   1. go
 
-The case for map is at `default` directory. Launch the provider by the following code.
+      Use goland to start generic-dubbo-go-server

Review comment:
       Please update the name of run.xml and README.




-- 
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] cjphaha commented on a change in pull request #230: Rft/add config enhance generic dubbo

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



##########
File path: generic/dubbo/go-client/conf/dubbogo.yml
##########
@@ -0,0 +1,12 @@
+dubbo:
+  registries:
+    zk:
+      protocol: "zookeeper"

Review comment:
       这个引号可以去掉

##########
File path: generic/dubbo/go-server/cmd/server.go
##########
@@ -18,61 +18,49 @@
 package main
 
 import (
+	"dubbo.apache.org/dubbo-go/v3/common/logger"
+	"dubbo.apache.org/dubbo-go/v3/config"

Review comment:
       同上面一样,一般第一个 import 块是原生包,第二个 import 块是外部的包,第三import 块是项目内部的包

##########
File path: generic/dubbo/go-client/cmd/client.go
##########
@@ -0,0 +1,316 @@
+/*
+ * 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 main
+
+import (
+	"context"
+	"fmt"
+	"os"
+	"os/signal"
+	"syscall"
+	"time"
+)
+
+import (
+	_ "dubbo.apache.org/dubbo-go/v3/cluster/cluster_impl"
+	_ "dubbo.apache.org/dubbo-go/v3/cluster/loadbalance"
+	"dubbo.apache.org/dubbo-go/v3/common/logger"
+	_ "dubbo.apache.org/dubbo-go/v3/common/proxy/proxy_factory"
+	"dubbo.apache.org/dubbo-go/v3/config"
+	"dubbo.apache.org/dubbo-go/v3/config/generic"
+	_ "dubbo.apache.org/dubbo-go/v3/filter/filter_impl"
+	"dubbo.apache.org/dubbo-go/v3/protocol/dubbo"
+	_ "dubbo.apache.org/dubbo-go/v3/registry/protocol"
+	_ "dubbo.apache.org/dubbo-go/v3/registry/zookeeper"
+
+	hessian "github.com/apache/dubbo-go-hessian2"
+
+	"github.com/apache/dubbo-go-samples/generic/dubbo/go-client/pkg"

Review comment:
       这个放在第三个 import 块会好一些

##########
File path: generic/dubbo/go-server/cmd/server.go
##########
@@ -18,61 +18,49 @@
 package main
 
 import (
+	"dubbo.apache.org/dubbo-go/v3/common/logger"
+	"dubbo.apache.org/dubbo-go/v3/config"
+	_ "dubbo.apache.org/dubbo-go/v3/imports"
 	"fmt"
+	hessian "github.com/apache/dubbo-go-hessian2"
 	"os"
 	"os/signal"
 	"syscall"
 	"time"
 )
 
 import (
-	_ "dubbo.apache.org/dubbo-go/v3/cluster/cluster_impl"
-	_ "dubbo.apache.org/dubbo-go/v3/cluster/loadbalance"
-	"dubbo.apache.org/dubbo-go/v3/common/logger"
-	_ "dubbo.apache.org/dubbo-go/v3/common/proxy/proxy_factory"
-	"dubbo.apache.org/dubbo-go/v3/config"
-	_ "dubbo.apache.org/dubbo-go/v3/filter/filter_impl"
-	_ "dubbo.apache.org/dubbo-go/v3/protocol/dubbo"
-	_ "dubbo.apache.org/dubbo-go/v3/registry/protocol"
-	_ "dubbo.apache.org/dubbo-go/v3/registry/zookeeper"
-
-	hessian "github.com/apache/dubbo-go-hessian2"
+	pkg "github.com/apache/dubbo-go-samples/generic/dubbo/go-server/pkg"
 )
 
-import (
-	"github.com/apache/dubbo-go-samples/generic/default/go-server/pkg"
-)
-
-var (
-	survivalTimeout = int(3e9)
-)
-
-// need to setup environment variable "CONF_PROVIDER_FILE_PATH" to "conf/server.yml" before run
+// export DUBBO_GO_CONFIG_PATH= PATH_TO_SAMPLES/generic/default/go-server/conf/dubbogo.yml
 func main() {
 	hessian.RegisterPOJO(&pkg.User{})
+	config.SetProviderService(&pkg.User{})
 	config.Load()
-
 	initSignal()
+	select {}

Review comment:
       initSignal 函数里面有一个 for 循环会阻塞住,这里可以不用 select{}

##########
File path: start_integrate_test.sh
##########
@@ -93,18 +93,20 @@
 DOCKER_DIR=$(pwd)/integrate_test/dockercompose
 
 array=("helloworld")
-array+=("direct")
-# config-api
-array+=("config-api/rpc/triple")
-array+=("config-api/configcenter/nacos")
-array+=("config-api/configcenter/zookeeper")
-# registry
-array+=("registry/zookeeper")
-array+=("registry/nacos")
-# rpc
-array+=("rpc/triple/codec-extension")
-array+=("rpc/triple/hessian2")
-array+=("rpc/triple/pb/dubbogo-grpc")
+##array+=("direct")
+### config-api
+##array+=("config-api/rpc/triple")
+##array+=("config-api/configcenter/nacos")
+##array+=("config-api/configcenter/zookeeper")
+### registry
+##array+=("registry/zookeeper")
+##array+=("registry/nacos")
+### rpc
+#array+=("rpc/triple/codec-extension")
+#array+=("rpc/triple/hessian2")
+#array+=("rpc/triple/pb/dubbogo-grpc")
+## generic
+#array=("generic/dubbo")

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 #230: Rft/add config enhance generic dubbo

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



##########
File path: generic/default/go-client/cmd/client.go
##########
@@ -93,25 +110,131 @@ func initSignal() {
 }
 
 func callGetUser() {
-	gxlog.CInfo("\n\n\nstart to generic invoke")
-	resp, err := referenceConfig.GetRPCService().(*config.GenericService).Invoke(
+	logger.Infof("Call GetUser")
+	logger.Infof("Start to generic invoke")
+	resp, err := referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
 		context.TODO(),
 		[]interface{}{
-			"GetUser",
+			"GetUser1",
 			[]string{"java.lang.String"},
 			[]hessian.Object{"A003"},
 		},
 	)
 	if err != nil {
 		panic(err)
 	}
-	gxlog.CInfo("res: %+v\n", resp)
-	gxlog.CInfo("success!")
+	logger.Infof("\n\nGetUser1(userId string) res: %+v\n", resp)
+
+	resp, err = referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
+		context.TODO(),
+		[]interface{}{
+			"GetUser2",
+			[]string{"java.lang.String", "java.lang.String"},
+			[]hessian.Object{"A003", "lily"},
+		},
+	)
+	if err != nil {
+		panic(err)
+	}
+	logger.Infof("\n\nGetUser2(userId string, name string) res: %+v\n", resp)
+
+	resp, err = referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
+		context.TODO(),
+		[]interface{}{

Review comment:
       @xavier-niu 这个地方还是套一层[]interface{}?




-- 
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] xavier-niu edited a comment on pull request #230: Rft/add config enhance generic dubbo

Posted by GitBox <gi...@apache.org>.
xavier-niu edited a comment on pull request #230:
URL: https://github.com/apache/dubbo-go-samples/pull/230#issuecomment-914811643


   The directory name, `generic/dubbo`, is not suitable to this sample, because dubbo is a way of serialization, instead of a way of generalisation. Please consider use `map` or `default` as the  directory name.


-- 
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] xavier-niu commented on a change in pull request #230: Rft/add config enhance generic dubbo

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



##########
File path: start_integrate_test.sh
##########
@@ -93,18 +93,20 @@
 DOCKER_DIR=$(pwd)/integrate_test/dockercompose
 
 array=("helloworld")
-array+=("direct")
-# config-api
-array+=("config-api/rpc/triple")
-array+=("config-api/configcenter/nacos")
-array+=("config-api/configcenter/zookeeper")
-# registry
-array+=("registry/zookeeper")
-array+=("registry/nacos")
-# rpc
-array+=("rpc/triple/codec-extension")
-array+=("rpc/triple/hessian2")
-array+=("rpc/triple/pb/dubbogo-grpc")
+##array+=("direct")
+### config-api
+##array+=("config-api/rpc/triple")
+##array+=("config-api/configcenter/nacos")
+##array+=("config-api/configcenter/zookeeper")
+### registry
+##array+=("registry/zookeeper")
+##array+=("registry/nacos")
+### rpc
+#array+=("rpc/triple/codec-extension")
+#array+=("rpc/triple/hessian2")
+#array+=("rpc/triple/pb/dubbogo-grpc")
+## generic
+#array=("generic/dubbo")

Review comment:
       `generic/default` integrated test should be enabled by
   
   ```sh
   array+=("generic/default")
   ```




-- 
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] xavier-niu commented on pull request #230: Rft/add config enhance generic dubbo

Posted by GitBox <gi...@apache.org>.
xavier-niu commented on pull request #230:
URL: https://github.com/apache/dubbo-go-samples/pull/230#issuecomment-914811643


   `generic/dubbo` is not suitable, because dubbo is a way of serialization. Please consider use `map` or `default` as the  directory name.


-- 
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] xavier-niu commented on a change in pull request #230: Rft/add config enhance generic dubbo

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



##########
File path: start_integrate_test.sh
##########
@@ -93,18 +93,20 @@
 DOCKER_DIR=$(pwd)/integrate_test/dockercompose
 
 array=("helloworld")
-array+=("direct")
-# config-api
-array+=("config-api/rpc/triple")
-array+=("config-api/configcenter/nacos")
-array+=("config-api/configcenter/zookeeper")
-# registry
-array+=("registry/zookeeper")
-array+=("registry/nacos")
-# rpc
-array+=("rpc/triple/codec-extension")
-array+=("rpc/triple/hessian2")
-array+=("rpc/triple/pb/dubbogo-grpc")
+##array+=("direct")
+### config-api
+##array+=("config-api/rpc/triple")
+##array+=("config-api/configcenter/nacos")
+##array+=("config-api/configcenter/zookeeper")
+### registry
+##array+=("registry/zookeeper")
+##array+=("registry/nacos")
+### rpc
+#array+=("rpc/triple/codec-extension")
+#array+=("rpc/triple/hessian2")
+#array+=("rpc/triple/pb/dubbogo-grpc")
+## generic
+#array=("generic/dubbo")

Review comment:
       Integrated test for `generic/default` should be enabled.




-- 
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] xavier-niu commented on a change in pull request #230: Rft/add config enhance generic dubbo

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



##########
File path: .run/generic-default-go-server.run.xml
##########
@@ -0,0 +1,14 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="generic-default-go-server" type="GoApplicationRunConfiguration" factoryName="Go Application" folderName="v3config-generic">
+    <module name="dubbo-go-samples" />
+    <working_directory value="$PROJECT_DIR$" />
+    <envs>
+      <env name="DUBBO_GO_CONFIG_PATH" value="$PROJECT_DIR$/generic/default/go-server/conf/dubbogo.yml" />
+    </envs>
+    <kind value="PACKAGE" />
+    <package value="github.com/apache/dubbo-go-samples/generic/default/go-server/cmd" />
+    <directory value="$PROJECT_DIR$/generic/dubbo/go-server/cmd" />

Review comment:
       generic/dubbo to generic/default




-- 
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 merged pull request #230: Rft/add config enhance generic dubbo

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


   


-- 
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 pull request #230: Rft/add config enhance generic dubbo

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


   please merge config-enhance.


-- 
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] xavier-niu edited a comment on pull request #230: Rft/add config enhance generic dubbo

Posted by GitBox <gi...@apache.org>.
xavier-niu edited a comment on pull request #230:
URL: https://github.com/apache/dubbo-go-samples/pull/230#issuecomment-914811643


   The directory name, `generic/dubbo`, is not suitable to this sample, because dubbo is a way of serialization. Please consider use `map` or `default` as the  directory name.


-- 
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] xavier-niu commented on a change in pull request #230: Rft/add config enhance generic dubbo

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



##########
File path: generic/default/go-client/cmd/client.go
##########
@@ -93,25 +110,131 @@ func initSignal() {
 }
 
 func callGetUser() {
-	gxlog.CInfo("\n\n\nstart to generic invoke")
-	resp, err := referenceConfig.GetRPCService().(*config.GenericService).Invoke(
+	logger.Infof("Call GetUser")
+	logger.Infof("Start to generic invoke")
+	resp, err := referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
 		context.TODO(),
 		[]interface{}{
-			"GetUser",
+			"GetUser1",
 			[]string{"java.lang.String"},
 			[]hessian.Object{"A003"},
 		},
 	)
 	if err != nil {
 		panic(err)
 	}
-	gxlog.CInfo("res: %+v\n", resp)
-	gxlog.CInfo("success!")
+	logger.Infof("\n\nGetUser1(userId string) res: %+v\n", resp)
+
+	resp, err = referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
+		context.TODO(),
+		[]interface{}{
+			"GetUser2",
+			[]string{"java.lang.String", "java.lang.String"},
+			[]hessian.Object{"A003", "lily"},
+		},
+	)
+	if err != nil {
+		panic(err)
+	}
+	logger.Infof("\n\nGetUser2(userId string, name string) res: %+v\n", resp)
+
+	resp, err = referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
+		context.TODO(),
+		[]interface{}{

Review comment:
       我最近把 dubbo-go 先改好,这个地方先按老方法来吧。




-- 
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] xavier-niu edited a comment on pull request #230: Rft/add config enhance generic dubbo

Posted by GitBox <gi...@apache.org>.
xavier-niu edited a comment on pull request #230:
URL: https://github.com/apache/dubbo-go-samples/pull/230#issuecomment-914811643


   The directory name, `generic/dubbo`, is not suitable, because dubbo is a way of serialization. Please consider use `map` or `default` as the  directory name.


-- 
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 #230: Rft/add config enhance generic dubbo

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



##########
File path: .run/generic-default-go-server.run.xml
##########
@@ -0,0 +1,14 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="generic-default-go-server" type="GoApplicationRunConfiguration" factoryName="Go Application" folderName="v3config-generic">
+    <module name="dubbo-go-samples" />
+    <working_directory value="$PROJECT_DIR$" />
+    <envs>
+      <env name="DUBBO_GO_CONFIG_PATH" value="$PROJECT_DIR$/generic/default/go-server/conf/dubbogo.yml" />
+    </envs>
+    <kind value="PACKAGE" />
+    <package value="github.com/apache/dubbo-go-samples/generic/default/go-server/cmd" />
+    <directory value="$PROJECT_DIR$/generic/dubbo/go-server/cmd" />

Review comment:
       这个就dubbo吧,别default了?




-- 
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 #230: Rft/add config enhance generic dubbo

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



##########
File path: generic/default/go-client/cmd/client.go
##########
@@ -93,25 +110,131 @@ func initSignal() {
 }
 
 func callGetUser() {
-	gxlog.CInfo("\n\n\nstart to generic invoke")
-	resp, err := referenceConfig.GetRPCService().(*config.GenericService).Invoke(
+	logger.Infof("Call GetUser")
+	logger.Infof("Start to generic invoke")
+	resp, err := referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
 		context.TODO(),
 		[]interface{}{
-			"GetUser",
+			"GetUser1",
 			[]string{"java.lang.String"},
 			[]hessian.Object{"A003"},
 		},
 	)
 	if err != nil {
 		panic(err)
 	}
-	gxlog.CInfo("res: %+v\n", resp)
-	gxlog.CInfo("success!")
+	logger.Infof("\n\nGetUser1(userId string) res: %+v\n", resp)
+
+	resp, err = referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
+		context.TODO(),
+		[]interface{}{
+			"GetUser2",
+			[]string{"java.lang.String", "java.lang.String"},
+			[]hessian.Object{"A003", "lily"},
+		},
+	)
+	if err != nil {
+		panic(err)
+	}
+	logger.Infof("\n\nGetUser2(userId string, name string) res: %+v\n", resp)
+
+	resp, err = referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
+		context.TODO(),
+		[]interface{}{

Review comment:
       这跟triple无法兼容吧,要不要一起改了




-- 
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 #230: Rft/add config enhance generic dubbo

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



##########
File path: generic/default/go-client/cmd/client.go
##########
@@ -93,25 +110,131 @@ func initSignal() {
 }
 
 func callGetUser() {
-	gxlog.CInfo("\n\n\nstart to generic invoke")
-	resp, err := referenceConfig.GetRPCService().(*config.GenericService).Invoke(
+	logger.Infof("Call GetUser")
+	logger.Infof("Start to generic invoke")
+	resp, err := referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
 		context.TODO(),
 		[]interface{}{
-			"GetUser",
+			"GetUser1",
 			[]string{"java.lang.String"},
 			[]hessian.Object{"A003"},
 		},
 	)
 	if err != nil {
 		panic(err)
 	}
-	gxlog.CInfo("res: %+v\n", resp)
-	gxlog.CInfo("success!")
+	logger.Infof("\n\nGetUser1(userId string) res: %+v\n", resp)
+
+	resp, err = referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
+		context.TODO(),
+		[]interface{}{
+			"GetUser2",
+			[]string{"java.lang.String", "java.lang.String"},
+			[]hessian.Object{"A003", "lily"},
+		},
+	)
+	if err != nil {
+		panic(err)
+	}
+	logger.Infof("\n\nGetUser2(userId string, name string) res: %+v\n", resp)
+
+	resp, err = referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
+		context.TODO(),
+		[]interface{}{

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] xavier-niu commented on a change in pull request #230: Rft/add config enhance generic dubbo

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



##########
File path: generic/default/go-client/cmd/client.go
##########
@@ -93,25 +110,131 @@ func initSignal() {
 }
 
 func callGetUser() {
-	gxlog.CInfo("\n\n\nstart to generic invoke")
-	resp, err := referenceConfig.GetRPCService().(*config.GenericService).Invoke(
+	logger.Infof("Call GetUser")
+	logger.Infof("Start to generic invoke")
+	resp, err := referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
 		context.TODO(),
 		[]interface{}{
-			"GetUser",
+			"GetUser1",
 			[]string{"java.lang.String"},
 			[]hessian.Object{"A003"},
 		},
 	)
 	if err != nil {
 		panic(err)
 	}
-	gxlog.CInfo("res: %+v\n", resp)
-	gxlog.CInfo("success!")
+	logger.Infof("\n\nGetUser1(userId string) res: %+v\n", resp)
+
+	resp, err = referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
+		context.TODO(),
+		[]interface{}{
+			"GetUser2",
+			[]string{"java.lang.String", "java.lang.String"},
+			[]hessian.Object{"A003", "lily"},
+		},
+	)
+	if err != nil {
+		panic(err)
+	}
+	logger.Infof("\n\nGetUser2(userId string, name string) res: %+v\n", resp)
+
+	resp, err = referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
+		context.TODO(),
+		[]interface{}{

Review comment:
       是的,这个地方现在还没改,这个地方改动需要先牵扯 dubbo-go 修改,然后才能改这里。




-- 
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 pull request #230: Rft/add config enhance generic dubbo

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


   Pls merge config-enhance branch and add array+=("generic/default") to pass ci check. @yaoyinnan 


-- 
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] xavier-niu commented on a change in pull request #230: Rft/add config enhance generic dubbo

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



##########
File path: generic/default/go-client/cmd/client.go
##########
@@ -93,25 +110,131 @@ func initSignal() {
 }
 
 func callGetUser() {
-	gxlog.CInfo("\n\n\nstart to generic invoke")
-	resp, err := referenceConfig.GetRPCService().(*config.GenericService).Invoke(
+	logger.Infof("Call GetUser")
+	logger.Infof("Start to generic invoke")
+	resp, err := referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
 		context.TODO(),
 		[]interface{}{
-			"GetUser",
+			"GetUser1",
 			[]string{"java.lang.String"},
 			[]hessian.Object{"A003"},
 		},
 	)
 	if err != nil {
 		panic(err)
 	}
-	gxlog.CInfo("res: %+v\n", resp)
-	gxlog.CInfo("success!")
+	logger.Infof("\n\nGetUser1(userId string) res: %+v\n", resp)
+
+	resp, err = referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
+		context.TODO(),
+		[]interface{}{
+			"GetUser2",
+			[]string{"java.lang.String", "java.lang.String"},
+			[]hessian.Object{"A003", "lily"},
+		},
+	)
+	if err != nil {
+		panic(err)
+	}
+	logger.Infof("\n\nGetUser2(userId string, name string) res: %+v\n", resp)
+
+	resp, err = referenceConfig.GetRPCService().(*generic.GenericService).Invoke(
+		context.TODO(),
+		[]interface{}{

Review comment:
       我最近把 dubbo-go 先改好




-- 
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] xavier-niu commented on pull request #230: Rft/add config enhance generic dubbo

Posted by GitBox <gi...@apache.org>.
xavier-niu commented on pull request #230:
URL: https://github.com/apache/dubbo-go-samples/pull/230#issuecomment-915235731


   @LaurenceLiZhixin Please approve running CI workflows.


-- 
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