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

Method ParseConfig

interop/xds/custom_lb.go:63–70  ·  view source on GitHub ↗
(s json.RawMessage)

Source from the content-addressed store, hash-verified

61}
62
63func (rpcBehaviorBB) ParseConfig(s json.RawMessage) (serviceconfig.LoadBalancingConfig, error) {
64 lbCfg := &lbConfig{}
65 if err := json.Unmarshal(s, lbCfg); err != nil {
66 return nil, fmt.Errorf("rpc-behavior-lb: unable to marshal lbConfig: %s, error: %v", string(s), err)
67 }
68 return lbCfg, nil
69
70}
71
72func (rpcBehaviorBB) Name() string {
73 return name

Callers

nothing calls this directly

Calls 2

UnmarshalMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected