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
28 lines
664 B
Go
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
|
|
}
|