MCPcopy
hub / github.com/modelcontextprotocol/registry / createProvider

Function createProvider

deploy/main.go:16–31  ·  view source on GitHub ↗

createProvider creates the appropriate cluster provider based on configuration

(ctx *pulumi.Context)

Source from the content-addressed store, hash-verified

14
15// createProvider creates the appropriate cluster provider based on configuration
16func createProvider(ctx *pulumi.Context) (providers.ClusterProvider, error) {
17 conf := config.New(ctx, "mcp-registry")
18 providerName := conf.Get("provider")
19 if providerName == "" {
20 providerName = "local" // Default to local provider
21 }
22
23 switch providerName {
24 case "gcp":
25 return &gcp.Provider{}, nil
26 case "local":
27 return &local.Provider{}, nil
28 default:
29 return nil, fmt.Errorf("unsupported provider: %s", providerName)
30 }
31}
32
33func main() {
34 pulumi.Run(func(ctx *pulumi.Context) error {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…