grpc c++ client How to update the server address

54 views
Skip to first unread message

毕凯强

unread,
Jan 16, 2024, 2:49:51 PM1/16/24
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


Are there any c++ examples?
Reply all
Reply to author
Forward
0 new messages