Skip to content

Commit

Permalink
delete withBalancerBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl committed Dec 4, 2017
1 parent 39cfee0 commit a04906e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions clientconn.go
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit a04906e

Please sign in to comment.