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

Function ParseConfig

internal/balancergroup/balancergroup.go:605–607  ·  view source on GitHub ↗

ParseConfig parses a child config list and returns a LB config for the gracefulswitch Balancer. cfg is expected to be a json.RawMessage containing a JSON array of LB policy names + configs as the format of the "loadBalancingConfig" field in ServiceConfig. It returns a type that should be passed to

(cfg json.RawMessage)

Source from the content-addressed store, hash-verified

603// ServiceConfig. It returns a type that should be passed to
604// UpdateClientConnState in the BalancerConfig field.
605func ParseConfig(cfg json.RawMessage) (serviceconfig.LoadBalancingConfig, error) {
606 return gracefulswitch.ParseConfig(cfg)
607}

Callers 2

updateChildrenMethod · 0.92

Calls 1

ParseConfigFunction · 0.92

Tested by 1