| 97 | } |
| 98 | |
| 99 | type leastRequestBalancer struct { |
| 100 | // Embeds balancer.ClientConn because we need to intercept UpdateState |
| 101 | // calls from the child balancer. |
| 102 | balancer.ClientConn |
| 103 | child balancer.Balancer |
| 104 | logger *internalgrpclog.PrefixLogger |
| 105 | |
| 106 | mu sync.Mutex |
| 107 | choiceCount uint32 |
| 108 | // endpointRPCCounts holds RPC counts to keep track for subsequent picker |
| 109 | // updates. |
| 110 | endpointRPCCounts *resolver.EndpointMap[*atomic.Int32] |
| 111 | } |
| 112 | |
| 113 | func (lrb *leastRequestBalancer) Close() { |
| 114 | lrb.child.Close() |
nothing calls this directly
no outgoing calls
no test coverage detected