diff --git a/clientconn.go b/clientconn.go index 0de8d464f85f..6b6e571b67b5 100644 --- a/clientconn.go +++ b/clientconn.go @@ -95,7 +95,7 @@ type dialOptions struct { scChan <-chan ServiceConfig copts transport.ConnectOptions callOptions []CallOption - // This is to support v1 balancer. + // This is used by v1 balancer dial option WithBalancer to support v1 balancer. balancerBuilder balancer.Builder // The balancer to be used. Can not be overridden by service config. balancerName string @@ -210,15 +210,6 @@ func WithBalancer(b Balancer) DialOption { } } -// withBalancerBuilder is for testing only. Users using custom balancers should -// register their balancer and use service config to choose the balancer to use. -func withBalancerBuilder(b balancer.Builder) DialOption { - // TODO(bar) remove this when switching balancer is done. - return func(o *dialOptions) { - o.balancerBuilder = b - } -} - // WithBalancerName sets the balancer that the ClientConn will be initialized // with. Balancer registered with balancerName will be used. If no balancer was // registered by balancerName, pick_first will be used.