rrPicker does roundrobin on subConns. It's typically used when there's no response from remote balancer, and grpclb falls back to the resolved backends. It guaranteed that len(subConns) > 0.
| 104 | // |
| 105 | // It guaranteed that len(subConns) > 0. |
| 106 | type rrPicker struct { |
| 107 | mu sync.Mutex |
| 108 | subConns []balancer.SubConn // The subConns that were READY when taking the snapshot. |
| 109 | subConnsNext int |
| 110 | } |
| 111 | |
| 112 | func newRRPicker(readySCs []balancer.SubConn) *rrPicker { |
| 113 | return &rrPicker{ |
nothing calls this directly
no outgoing calls
no test coverage detected