You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/09/22 15:16:45 UTC

[GitHub] [skywalking-satellite] wu-sheng commented on a change in pull request #68: Support load-balance GRPC client with static server list

wu-sheng commented on a change in pull request #68:
URL: https://github.com/apache/skywalking-satellite/pull/68#discussion_r714050900



##########
File path: plugins/client/grpc/client.go
##########
@@ -100,8 +102,15 @@ func (c *Client) Prepare() error {
 		"client_name": Name,
 	})})
 
+	// server address resolver
+	resolvers.RegisterAllGrpcResolvers()
+
 	// connect to server
-	client, err := grpc.Dial(c.ServerAddr, *cfg...)
+	target, err := resolvers.BuildTarget(&c.ServerFinderConfig)
+	if err != nil {
+		return fmt.Errorf("cannot build grpc target: %v", err)
+	}
+	client, err := grpc.Dial(target, *cfg...)

Review comment:
       This makes me feel you have one logic client reference? Who controls the routine rule?




-- 
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@skywalking.apache.org

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