ExitIdle forwards the call to the latest balancer created. If the latest balancer does not support ExitIdle, the subConns are re-connected to manually.
()
| 222 | // If the latest balancer does not support ExitIdle, the subConns are |
| 223 | // re-connected to manually. |
| 224 | func (gsb *Balancer) ExitIdle() { |
| 225 | balToUpdate := gsb.latestBalancer() |
| 226 | if balToUpdate == nil { |
| 227 | return |
| 228 | } |
| 229 | // There is no need to protect this read with a mutex, as the write to the |
| 230 | // Balancer field happens in SwitchTo, which completes before this can be |
| 231 | // called. |
| 232 | balToUpdate.ExitIdle() |
| 233 | } |
| 234 | |
| 235 | // updateSubConnState forwards the update to the appropriate child. |
| 236 | func (gsb *Balancer) updateSubConnState(sc balancer.SubConn, state balancer.SubConnState, cb func(balancer.SubConnState)) { |
nothing calls this directly
no test coverage detected