robotLJW commented on a change in pull request #1205:
URL:
https://github.com/apache/servicecomb-service-center/pull/1205#discussion_r780621502
##########
File path: client/set.go
##########
@@ -19,13 +32,29 @@ type Set struct {
}
// NewSetForConfig dial grpc connection and create all grpc clients
-func NewSetForConfig(c SetConfig) (*Set, error) {
- conn, err := grpc.Dial(c.Addr, grpc.WithInsecure())
+func NewSetForConfig(c SetConfig) (*grpc.ClientConn, *Set, error) {
Review comment:
三个返回值是不是不太好,一般是2个,华哥怎么看
##########
File path: server/rpc/sync/server.go
##########
@@ -16,3 +22,12 @@ func (s *Server) Sync(ctx context.Context, events
*v1sync.EventList) (*v1sync.Re
log.Info(fmt.Sprintf("Received: %v", events.Events[0].Action))
return &v1sync.Results{}, nil
}
+
+func (s *Server) Health(ctx context.Context, request *v1sync.HealthRequest)
(*v1sync.HealthReply, error) {
+ log.Info(fmt.Sprintf("Health Received"))
Review comment:
这边如果不打印变量的话可以直接"Health Received",不需要fmt.Sprintf
##########
File path: syncer/resource/admin/admin.go
##########
@@ -18,22 +18,39 @@
package admin
import (
+ "github.com/apache/servicecomb-service-center/server/handler/exception"
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]