diff --git a/clientconn.go b/clientconn.go index 0e5f2f271ee1..3174c33b9c51 100644 --- a/clientconn.go +++ b/clientconn.go @@ -200,6 +200,7 @@ func WithDecompressor(dc Decompressor) DialOption { // WithBalancer returns a DialOption which sets a load balancer with the v1 API. // Name resolver will be ignored if this DialOption is specified. +// // Deprecated: use the new balancer APIs in balancer package and WithBalancerName. func WithBalancer(b Balancer) DialOption { return func(o *dialOptions) { @@ -219,8 +220,11 @@ func WithBalancerBuilder(b balancer.Builder) DialOption { } // WithBalancerName sets the balancer that the ClientConn will be initialized -// with. The balancer can not be overridden by balancer option specified by -// service config. +// with. Balancer registered with balancerName will be used. If no balancer was +// registered by balancerName, pick_first will be used. +// +// The balancer cannot be overridden by balancer option specified by service +// config. func WithBalancerName(balancerName string) DialOption { return func(o *dialOptions) { o.balancerName = balancerName