Notify parent ClientConn to re-resolve in grpclb (#1699)
The parent ClientConn should re-resolve when grpclb loses connection to the remote balancer. When the ClientConn inside grpclb gets a TransientFailure, it calls lbManualResolver.ResolveNow(), which calls parent ClientConn's ResolveNow, and eventually results in re-resolve happening in parent ClientConn's resolver (DNS for example). This PR adds a method to balancer.ClientConn interface, so balancer can tell parent ClientConn to re-resolve.
This commit is contained in:
@ -109,6 +109,9 @@ type ClientConn interface {
|
||||
// on the new picker to pick new SubConn.
|
||||
UpdateBalancerState(s connectivity.State, p Picker)
|
||||
|
||||
// ResolveNow is called by balancer to notify gRPC to do a name resolving.
|
||||
ResolveNow(resolver.ResolveNowOption)
|
||||
|
||||
// Target returns the dial target for this ClientConn.
|
||||
Target() string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user