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

Struct leastRequestBalancer

balancer/leastrequest/leastrequest.go:99–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99type 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
113func (lrb *leastRequestBalancer) Close() {
114 lrb.child.Close()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected