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

Method UpdateClientConnState

interop/xds/custom_lb.go:94–105  ·  view source on GitHub ↗
(s balancer.ClientConnState)

Source from the content-addressed store, hash-verified

92}
93
94func (b *rpcBehaviorLB) UpdateClientConnState(s balancer.ClientConnState) error {
95 lbCfg, ok := s.BalancerConfig.(*lbConfig)
96 if !ok {
97 return fmt.Errorf("test.RpcBehaviorLoadBalancer:received config with unexpected type %T: %s", s.BalancerConfig, pretty.ToJSON(s.BalancerConfig))
98 }
99 b.mu.Lock()
100 b.cfg = lbCfg
101 b.mu.Unlock()
102 return b.Balancer.UpdateClientConnState(balancer.ClientConnState{
103 ResolverState: s.ResolverState,
104 })
105}
106
107func (b *rpcBehaviorLB) UpdateState(state balancer.State) {
108 b.mu.Lock()

Callers

nothing calls this directly

Calls 5

ToJSONFunction · 0.92
ErrorfMethod · 0.65
UpdateClientConnStateMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected