From ddbfe3eb7a01f0e8adf15002cfd85d4dcda614cf Mon Sep 17 00:00:00 2001 From: Doug Fawley Date: Tue, 19 Oct 2021 15:40:18 -0700 Subject: [PATCH] examples: update load balancing example to use loadBalancingConfig --- examples/features/load_balancing/client/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/features/load_balancing/client/main.go b/examples/features/load_balancing/client/main.go index 1578df16671b..72c5ad9c1468 100644 --- a/examples/features/load_balancing/client/main.go +++ b/examples/features/load_balancing/client/main.go @@ -55,7 +55,7 @@ func makeRPCs(cc *grpc.ClientConn, n int) { } func main() { - // "pick_first" is the default, so there's no need to set the load balancer. + // "pick_first" is the default, so there's no need to set the load balancing policy. pickfirstConn, err := grpc.Dial( fmt.Sprintf("%s:///%s", exampleScheme, exampleServiceName), grpc.WithInsecure(), @@ -74,7 +74,7 @@ func main() { // Make another ClientConn with round_robin policy. roundrobinConn, err := grpc.Dial( fmt.Sprintf("%s:///%s", exampleScheme, exampleServiceName), - grpc.WithDefaultServiceConfig(`{"loadBalancingPolicy":"round_robin"}`), // This sets the initial balancing policy. + grpc.WithDefaultServiceConfig(`{"loadBalancingConfig": [{"round_robin":{}}]}`), // This sets the initial balancing policy. grpc.WithInsecure(), grpc.WithBlock(), )