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

Struct rrPicker

balancer/grpclb/grpclb_picker.go:106–110  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

104//
105// It guaranteed that len(subConns) > 0.
106type rrPicker struct {
107 mu sync.Mutex
108 subConns []balancer.SubConn // The subConns that were READY when taking the snapshot.
109 subConnsNext int
110}
111
112func newRRPicker(readySCs []balancer.SubConn) *rrPicker {
113 return &rrPicker{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected