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

Method UpdateState

test/end2end_test.go:7263–7272  ·  view source on GitHub ↗
(state balancer.State)

Source from the content-addressed store, hash-verified

7261}
7262
7263func (bpb *triggerRPCBlockBalancer) UpdateState(state balancer.State) {
7264 bpb.stateMu.Lock()
7265 defer bpb.stateMu.Unlock()
7266 bpb.childState = state
7267 if bpb.blockingPickerDone.HasFired() { // guard first one to get a picker sending ErrNoSubConnAvailable first
7268 if state.ConnectivityState == connectivity.Ready {
7269 bpb.ClientConn.UpdateState(state) // after the first rr picker update, only forward once READY for deterministic picker counts
7270 }
7271 }
7272}
7273
7274// TestRPCBlockingOnPickerStatsCall tests the emission of a stats handler call
7275// that represents the RPC had to block waiting for a new picker due to

Callers

nothing calls this directly

Calls 4

UpdateStateMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45
HasFiredMethod · 0.45

Tested by

no test coverage detected