(cc balancer.ClientConn, bOpts balancer.BuildOptions)
| 86 | } |
| 87 | |
| 88 | func (bb) Build(cc balancer.ClientConn, bOpts balancer.BuildOptions) balancer.Balancer { |
| 89 | b := &leastRequestBalancer{ |
| 90 | ClientConn: cc, |
| 91 | endpointRPCCounts: resolver.NewEndpointMap[*atomic.Int32](), |
| 92 | } |
| 93 | b.child = endpointsharding.NewBalancer(b, bOpts, balancer.Get(pickfirst.Name).Build, endpointsharding.Options{}) |
| 94 | b.logger = internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf("[%p] ", b)) |
| 95 | b.logger.Infof("Created") |
| 96 | return b |
| 97 | } |
| 98 | |
| 99 | type leastRequestBalancer struct { |
| 100 | // Embeds balancer.ClientConn because we need to intercept UpdateState |
nothing calls this directly
no test coverage detected