| 31 | var timeAfterFunc = time.AfterFunc |
| 32 | |
| 33 | type childBalancer struct { |
| 34 | name string |
| 35 | parent *priorityBalancer |
| 36 | parentCC balancer.ClientConn |
| 37 | balancerName string |
| 38 | cc *ignoreResolveNowClientConn |
| 39 | |
| 40 | ignoreReresolutionRequests bool |
| 41 | config serviceconfig.LoadBalancingConfig |
| 42 | rState resolver.State |
| 43 | |
| 44 | started bool |
| 45 | // This is set when the child reports TransientFailure, and unset when it |
| 46 | // reports Ready or Idle. It is used to decide whether the failover timer |
| 47 | // should start when the child is transitioning into Connecting. The timer |
| 48 | // will be restarted if the child has not reported TF more recently than it |
| 49 | // reported Ready or Idle. |
| 50 | reportedTF bool |
| 51 | // The latest state the child balancer provided. |
| 52 | state balancer.State |
| 53 | // The timer to give a priority some time to connect. And if the priority |
| 54 | // doesn't go into Ready/Failure, the next priority will be started. |
| 55 | initTimer *timerWrapper |
| 56 | } |
| 57 | |
| 58 | // newChildBalancer creates a child balancer place holder, but doesn't |
| 59 | // build/start the child balancer. |
nothing calls this directly
no outgoing calls
no test coverage detected