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

Method UpdateState

interop/xds/custom_lb.go:107–116  ·  view source on GitHub ↗
(state balancer.State)

Source from the content-addressed store, hash-verified

105}
106
107func (b *rpcBehaviorLB) UpdateState(state balancer.State) {
108 b.mu.Lock()
109 rpcBehavior := b.cfg.RPCBehavior
110 b.mu.Unlock()
111
112 b.ClientConn.UpdateState(balancer.State{
113 ConnectivityState: state.ConnectivityState,
114 Picker: newRPCBehaviorPicker(state.Picker, rpcBehavior),
115 })
116}
117
118// rpcBehaviorPicker wraps a picker and adds the rpc-behavior metadata field
119// into the child pick result's metadata.

Callers

nothing calls this directly

Calls 4

newRPCBehaviorPickerFunction · 0.85
UpdateStateMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected