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

Struct orcab

interop/orcalb.go:69–80  ·  view source on GitHub ↗

orcab is the balancer for the test_backend_metrics_load_balancer policy. It delegates SubConn management to endpointsharding + pick_first and intercepts NewSubConn calls to register OOB listeners on READY SubConns.

Source from the content-addressed store, hash-verified

67// It delegates SubConn management to endpointsharding + pick_first and
68// intercepts NewSubConn calls to register OOB listeners on READY SubConns.
69type orcab struct {
70 // The following fields are initialized at build time and read-only after
71 // that and therefore do not need to be guarded by a mutex.
72 balancer.ClientConn // Embeds to intercept NewSubConn and UpdateState calls
73 child balancer.Balancer
74 oobState *oobState
75 logger *internalgrpclog.PrefixLogger
76
77 // mu guards the fields below.
78 mu sync.Mutex
79 stopOOBListeners map[balancer.SubConn]func()
80}
81
82func (b *orcab) UpdateClientConnState(s balancer.ClientConnState) error {
83 // Delegate to the child endpoint sharding balancer, which distributes

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected