MCPcopy Index your code
hub / github.com/coder/coder / NewDisabledProviderStub

Function NewDisabledProviderStub

aibridge/api.go:64–66  ·  view source on GitHub ↗

NewDisabledProviderStub returns a Provider that reports Enabled() == false and has no-op implementations for all other methods. Use this instead of constructing a concrete provider for disabled rows so that adding a new provider type does not require updating a switch here.

(name, providerType string)

Source from the content-addressed store, hash-verified

62// instead of constructing a concrete provider for disabled rows so that
63// adding a new provider type does not require updating a switch here.
64func NewDisabledProviderStub(name, providerType string) provider.Provider {
65 return provider.NewDisabledStub(name, providerType)
66}
67
68func NewMetrics(reg prometheus.Registerer) *metrics.Metrics {
69 return metrics.NewMetrics(reg)

Callers 2

disabledProviderFromRowFunction · 0.92

Calls 1

NewDisabledStubFunction · 0.92

Tested by 1