Groups
Groups
Sign in
Groups
Groups
grpc.io
Conversations
About
Send feedback
Help
grpc c++ client How to update the server address
54 views
Skip to first unread message
毕凯强
unread,
Jan 16, 2024, 2:49:51 PM
1/16/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to grpc.io
example:
grpc
::
ChannelArguments
args
;
args
.
SetLoadBalancingPolicyName
(
"round_robin"
);
auto
channel
=
grpc
::
CreateCustomChannel
(
"ipv4:///
127.0.0.1:50051
,
127.0.0.1:50052
"
,
grpc
::
InsecureChannelCredentials
(),
args
);
So how to add a new server address during use。for example:
127.0.0.1:50051
How to register a balancer like golang. How You can control PickResult during use and register your own load balancing algorithm
for example:
https://github.com/go-kratos/kratos/blob/main/transport/grpc/balancer.go
Are there any c++ examples?
Reply all
Reply to author
Forward
0 new messages