MCPcopy
hub / github.com/grpc/grpc-go / ChildStatesFromPicker

Function ChildStatesFromPicker

balancer/endpointsharding/endpointsharding.go:323–329  ·  view source on GitHub ↗

ChildStatesFromPicker returns the state of all the children managed by the endpoint sharding balancer that created this picker.

(picker balancer.Picker)

Source from the content-addressed store, hash-verified

321// ChildStatesFromPicker returns the state of all the children managed by the
322// endpoint sharding balancer that created this picker.
323func 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.

Callers 5

UpdateStateMethod · 0.92
UpdateStateMethod · 0.92
UpdateStateMethod · 0.92
UpdateStateMethod · 0.92
UpdateStateMethod · 0.92

Calls

no outgoing calls

Tested by 1

UpdateStateMethod · 0.74