pulumi/pkg/compiler/opts.go
joeduffy 8a7fbf019c Add the ability to select a cloud provider
This adds two packages:

        mu/pkg/compiler/clouds
        mu/pkg/compiler/schedulers

And introduces enums for the cloud targets we expect to support.

It also adds the ability at the command line to specify a provider;
for example:

        $ mu build --target=aws         # AWS native
        $ mu build --target=aws:ecs     # AWS ECS
        $ mu build -t=gcp:kubernetes    # Kube on GCP
2016-11-17 07:00:52 -08:00

28 lines
664 B
Go

// Copyright 2016 Marapongo, Inc. All rights reserved.
package compiler
import (
"github.com/marapongo/mu/pkg/compiler/clouds"
"github.com/marapongo/mu/pkg/compiler/schedulers"
"github.com/marapongo/mu/pkg/diag"
)
// Options contains all of the settings a user can use to control the compiler's behavior.
type Options struct {
Diag diag.Sink
Target Target
}
// DefaultOpts returns the default set of compiler options.
func DefaultOpts(pwd string) Options {
return Options{
Diag: diag.DefaultSink(pwd),
}
}
// Target is the target "architecture" we are compiling against.
type Target struct {
Cloud clouds.Target
Scheduler schedulers.Target
}