ChildStatesFromPicker returns the state of all the children managed by the endpoint sharding balancer that created this picker.
(picker balancer.Picker)
| 321 | // ChildStatesFromPicker returns the state of all the children managed by the |
| 322 | // endpoint sharding balancer that created this picker. |
| 323 | func ChildStatesFromPicker(picker balancer.Picker) []ChildState { |
| 324 | p, ok := picker.(*pickerWithChildStates) |
| 325 | if !ok { |
| 326 | return nil |
| 327 | } |
| 328 | return p.childStates |
| 329 | } |
| 330 | |
| 331 | // balancerWrapper is a wrapper of a balancer. It ID's a child balancer by |
| 332 | // endpoint, and persists recent child balancer state. |
no outgoing calls