Skip to content

Commit

Permalink
balancer: remove deprecated type aliases as planned (#3742)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley committed Jul 16, 2020
1 parent dd8658f commit 1154df9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 25 deletions.
10 changes: 0 additions & 10 deletions balancer/balancer.go
Expand Up @@ -312,16 +312,6 @@ type Balancer interface {
Close()
}

// V2Balancer is temporarily defined for backward compatibility reasons.
//
// Deprecated: use Balancer directly instead.
type V2Balancer = Balancer

// V2Picker is temporarily defined for backward compatibility reasons.
//
// Deprecated: use Picker directly instead.
type V2Picker = Picker

// SubConnState describes the state of a SubConn.
type SubConnState struct {
// ConnectivityState is the connectivity state of the SubConn.
Expand Down
11 changes: 0 additions & 11 deletions balancer/base/base.go
Expand Up @@ -69,14 +69,3 @@ func NewBalancerBuilder(name string, pb PickerBuilder, config Config) balancer.B
config: config,
}
}

// NewBalancerBuilderV2 is temporarily defined for backward compatibility
// reasons.
//
// Deprecated: use NewBalancerBuilder instead.
var NewBalancerBuilderV2 = NewBalancerBuilder

// V2PickerBuilder is temporarily defined for backward compatibility reasons.
//
// Deprecated: use PickerBuilder instead.
type V2PickerBuilder = PickerBuilder
6 changes: 3 additions & 3 deletions balancer/rls/internal/balancer.go
Expand Up @@ -97,7 +97,7 @@ func (lb *rlsBalancer) handleClientConnUpdate(ccs *balancer.ClientConnState) {

// UpdateClientConnState pushes the received ClientConnState update on the
// update channel which will be processed asynchronously by the run goroutine.
// Implements balancer.V2Balancer interface.
// Implements balancer.Balancer interface.
func (lb *rlsBalancer) UpdateClientConnState(ccs balancer.ClientConnState) error {
select {
case lb.ccUpdateCh <- &ccs:
Expand All @@ -106,14 +106,14 @@ func (lb *rlsBalancer) UpdateClientConnState(ccs balancer.ClientConnState) error
return nil
}

// ResolverErr implements balancer.V2Balancer interface.
// ResolverErr implements balancer.Balancer interface.
func (lb *rlsBalancer) ResolverError(error) {
// ResolverError is called by gRPC when the name resolver reports an error.
// TODO(easwars): How do we handle this?
logger.Fatal("rls: ResolverError is not yet unimplemented")
}

// UpdateSubConnState implements balancer.V2Balancer interface.
// UpdateSubConnState implements balancer.Balancer interface.
func (lb *rlsBalancer) UpdateSubConnState(_ balancer.SubConn, _ balancer.SubConnState) {
logger.Fatal("rls: UpdateSubConnState is not yet implemented")
}
Expand Down
1 change: 0 additions & 1 deletion xds/internal/balancer/cdsbalancer/cdsbalancer_test.go
Expand Up @@ -231,7 +231,6 @@ func edsCCS(service string, enableLRS bool, xdsClient interface{}) balancer.Clie
func setup() (*cdsBalancer, *testEDSBalancer, *testClientConn, func()) {
builder := cdsBB{}
tcc := newTestClientConn()
// cdsB := builder.Build(tcc, balancer.BuildOptions{}).(balancer.V2Balancer)
cdsB := builder.Build(tcc, balancer.BuildOptions{})

edsB := newTestEDSBalancer()
Expand Down

0 comments on commit 1154df9

Please sign in to comment.