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

Method ParseConfig

credentials/tls/certprovider/store_test.go:74–87  ·  view source on GitHub ↗
(config any)

Source from the content-addressed store, hash-verified

72}
73
74func (b *fakeProviderBuilder) ParseConfig(config any) (*BuildableConfig, error) {
75 s, ok := config.(string)
76 if !ok {
77 return nil, fmt.Errorf("providerBuilder %s received config of type %T, want string", b.name, config)
78 }
79 return NewBuildableConfig(b.name, []byte(s), func(BuildOptions) Provider {
80 fp := &fakeProvider{
81 Distributor: NewDistributor(),
82 config: s,
83 }
84 b.providerChan.Send(fp)
85 return fp
86 }), nil
87}
88
89func (b *fakeProviderBuilder) Name() string {
90 return b.name

Callers

nothing calls this directly

Calls 4

NewBuildableConfigFunction · 0.85
NewDistributorFunction · 0.85
ErrorfMethod · 0.65
SendMethod · 0.65

Tested by

no test coverage detected