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

Function parseServiceConfig

test/parse_config.go:30–38  ·  view source on GitHub ↗

parseServiceConfig is a test helper which uses the manual resolver to parse the given service config. It calls t.Fatal() if service config parsing fails.

(t *testing.T, r *manual.Resolver, sc string)

Source from the content-addressed store, hash-verified

28// parseServiceConfig is a test helper which uses the manual resolver to parse
29// the given service config. It calls t.Fatal() if service config parsing fails.
30func parseServiceConfig(t *testing.T, r *manual.Resolver, sc string) *serviceconfig.ParseResult {
31 t.Helper()
32
33 scpr := r.CC().ParseServiceConfig(sc)
34 if scpr.Err != nil {
35 t.Fatalf("Failed to parse service config %q: %v", sc, scpr.Err)
36 }
37 return scpr
38}

Calls 3

CCMethod · 0.80
ParseServiceConfigMethod · 0.65
FatalfMethod · 0.65