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

Function ParseConfig

credentials/tls/certprovider/store.go:180–186  ·  view source on GitHub ↗

ParseConfig is a convenience function to create a BuildableConfig given a provider name and configuration. Returns an error if there is no registered builder for the given name or if the config parsing fails.

(name string, config any)

Source from the content-addressed store, hash-verified

178// provider name and configuration. Returns an error if there is no registered
179// builder for the given name or if the config parsing fails.
180func ParseConfig(name string, config any) (*BuildableConfig, error) {
181 parser := getBuilder(name)
182 if parser == nil {
183 return nil, fmt.Errorf("no certificate provider builder found for %q", name)
184 }
185 return parser.ParseConfig(config)
186}
187
188// GetProvider is a convenience function to create a provider given the name,
189// config and build options.

Callers 1

GetProviderFunction · 0.70

Calls 3

getBuilderFunction · 0.85
ErrorfMethod · 0.65
ParseConfigMethod · 0.65

Tested by

no test coverage detected