balancerWrapper wraps a balancer.Balancer, and overrides some Balancer methods to help cleanup SubConns created by the wrapped balancer. It implements the balancer.ClientConn interface and is passed down in that capacity to the wrapped balancer. It maintains a set of subConns created by the wrapped
| 293 | // State updates from the wrapped balancer can result in invocation of the |
| 294 | // graceful switch logic. |
| 295 | type balancerWrapper struct { |
| 296 | balancer.ClientConn |
| 297 | balancer.Balancer |
| 298 | gsb *Balancer |
| 299 | builder balancer.Builder |
| 300 | |
| 301 | lastState balancer.State |
| 302 | subconns map[balancer.SubConn]bool // subconns created by this balancer |
| 303 | } |
| 304 | |
| 305 | // Close closes the underlying LB policy and shuts down the subconns it |
| 306 | // created. bw must not be referenced via balancerCurrent or balancerPending in |
nothing calls this directly
no outgoing calls
no test coverage detected