Skip to content

Commit

Permalink
Merge pull request #10551 from johncming/lbname
Browse files Browse the repository at this point in the history
clientv3/balancer: change balancer name to builder name.
  • Loading branch information
jpbetz authored Apr 10, 2019
2 parents d690900 + ddff08f commit c7c6894
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions clientv3/balancer/balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (b *builder) Build(cc balancer.ClientConn, opt balancer.BuildOptions) balan
bb := &baseBalancer{
id: strconv.FormatInt(time.Now().UnixNano(), 36),
policy: b.cfg.Policy,
name: b.cfg.Policy.String(),
name: b.cfg.Name,
lg: b.cfg.Logger,

addrToSc: make(map[resolver.Address]balancer.SubConn),
Expand All @@ -67,9 +67,6 @@ func (b *builder) Build(cc balancer.ClientConn, opt balancer.BuildOptions) balan
// initialize picker always returns "ErrNoSubConnAvailable"
Picker: picker.NewErr(balancer.ErrNoSubConnAvailable),
}
if b.cfg.Name != "" {
bb.name = b.cfg.Name
}
if bb.lg == nil {
bb.lg = zap.NewNop()
}
Expand Down

0 comments on commit c7c6894

Please sign in to comment.