Update k8s apis to release-1.14 and update all of vendor
This commit is contained in:
29
vendor/google.golang.org/grpc/balancer_conn_wrappers.go
generated
vendored
29
vendor/google.golang.org/grpc/balancer_conn_wrappers.go
generated
vendored
@@ -178,6 +178,28 @@ func (ccb *ccBalancerWrapper) handleSubConnStateChange(sc balancer.SubConn, s co
|
||||
}
|
||||
|
||||
func (ccb *ccBalancerWrapper) handleResolvedAddrs(addrs []resolver.Address, err error) {
|
||||
if ccb.cc.curBalancerName != grpclbName {
|
||||
var containsGRPCLB bool
|
||||
for _, a := range addrs {
|
||||
if a.Type == resolver.GRPCLB {
|
||||
containsGRPCLB = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if containsGRPCLB {
|
||||
// The current balancer is not grpclb, but addresses contain grpclb
|
||||
// address. This means we failed to switch to grpclb, most likely
|
||||
// because grpclb is not registered. Filter out all grpclb addresses
|
||||
// from addrs before sending to balancer.
|
||||
tempAddrs := make([]resolver.Address, 0, len(addrs))
|
||||
for _, a := range addrs {
|
||||
if a.Type != resolver.GRPCLB {
|
||||
tempAddrs = append(tempAddrs, a)
|
||||
}
|
||||
}
|
||||
addrs = tempAddrs
|
||||
}
|
||||
}
|
||||
select {
|
||||
case <-ccb.resolverUpdateCh:
|
||||
default:
|
||||
@@ -229,8 +251,13 @@ func (ccb *ccBalancerWrapper) UpdateBalancerState(s connectivity.State, p balanc
|
||||
if ccb.subConns == nil {
|
||||
return
|
||||
}
|
||||
ccb.cc.csMgr.updateState(s)
|
||||
// Update picker before updating state. Even though the ordering here does
|
||||
// not matter, it can lead to multiple calls of Pick in the common start-up
|
||||
// case where we wait for ready and then perform an RPC. If the picker is
|
||||
// updated later, we could call the "connecting" picker when the state is
|
||||
// updated, and then call the "ready" picker after the picker gets updated.
|
||||
ccb.cc.blockingpicker.updatePicker(p)
|
||||
ccb.cc.csMgr.updateState(s)
|
||||
}
|
||||
|
||||
func (ccb *ccBalancerWrapper) ResolveNow(o resolver.ResolveNowOption) {
|
||||
|
Reference in New Issue
Block a user