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

Method UpdateClientConnState

balancer/rls/internal/test/e2e/rls_child_policy.go:105–116  ·  view source on GitHub ↗
(c balancer.ClientConnState)

Source from the content-addressed store, hash-verified

103}
104
105func (b *bal) UpdateClientConnState(c balancer.ClientConnState) error {
106 cfg, ok := c.BalancerConfig.(*RLSChildPolicyConfig)
107 if !ok {
108 return fmt.Errorf("received balancer config of type %T, want %T", c.BalancerConfig, &RLSChildPolicyConfig{})
109 }
110 if b.bf != nil && b.bf.UpdateClientConnState != nil {
111 b.bf.UpdateClientConnState(cfg)
112 }
113 return b.Balancer.UpdateClientConnState(balancer.ClientConnState{
114 ResolverState: resolver.State{Addresses: []resolver.Address{{Addr: cfg.Backend}}},
115 })
116}
117
118func (b *bal) Close() {
119 b.Balancer.Close()

Callers

nothing calls this directly

Calls 2

ErrorfMethod · 0.65
UpdateClientConnStateMethod · 0.65

Tested by

no test coverage detected