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

Struct acBalancerWrapper

balancer_wrapper.go:269–284  ·  view source on GitHub ↗

acBalancerWrapper is a wrapper on top of ac for balancers. It implements balancer.SubConn interface.

Source from the content-addressed store, hash-verified

267// acBalancerWrapper is a wrapper on top of ac for balancers.
268// It implements balancer.SubConn interface.
269type acBalancerWrapper struct {
270 internal.EnforceSubConnEmbedding
271 ac *addrConn // read-only
272 ccb *ccBalancerWrapper // read-only
273 stateListener func(balancer.SubConnState)
274
275 producersMu sync.Mutex
276 producers map[balancer.ProducerBuilder]*refCountedProducer
277
278 // Access to healthData is protected by healthMu.
279 healthMu sync.Mutex
280 // healthData is stored as a pointer to detect when the health listener is
281 // dropped or updated. This is required as closures can't be compared for
282 // equality.
283 healthData *healthData
284}
285
286// healthData holds data related to health state reporting.
287type healthData struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected