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

Method ExitIdle

internal/balancer/gracefulswitch/gracefulswitch.go:224–233  ·  view source on GitHub ↗

ExitIdle forwards the call to the latest balancer created. If the latest balancer does not support ExitIdle, the subConns are re-connected to manually.

()

Source from the content-addressed store, hash-verified

222// If the latest balancer does not support ExitIdle, the subConns are
223// re-connected to manually.
224func (gsb *Balancer) ExitIdle() {
225 balToUpdate := gsb.latestBalancer()
226 if balToUpdate == nil {
227 return
228 }
229 // There is no need to protect this read with a mutex, as the write to the
230 // Balancer field happens in SwitchTo, which completes before this can be
231 // called.
232 balToUpdate.ExitIdle()
233}
234
235// updateSubConnState forwards the update to the appropriate child.
236func (gsb *Balancer) updateSubConnState(sc balancer.SubConn, state balancer.SubConnState, cb func(balancer.SubConnState)) {

Callers

nothing calls this directly

Implementers 15

orcabinterop/orcalb.go
leastRequestBalancerbalancer/leastrequest/leastrequest.go
rlsBalancerbalancer/rls/balancer.go
weightedTargetBalancerbalancer/weightedtarget/weightedtarget
lbBalancerbalancer/grpclb/grpclb.go
lazyBalancerbalancer/lazy/lazy.go
pickfirstBalancerbalancer/pickfirst/pickfirst.go
baseBalancerbalancer/base/balancer.go
ringhashBalancerbalancer/ringhash/ringhash.go
wrrBalancerbalancer/weightedroundrobin/balancer.g
endpointShardingbalancer/endpointsharding/endpointshar
testBalancertest/balancer_test.go

Calls 2

latestBalancerMethod · 0.95
ExitIdleMethod · 0.65

Tested by

no test coverage detected