Documentation
¶
Overview ¶
Package engine manages the CLI engine binaries that carry out run operations.
Index ¶
Constants ¶
const MinEngineVersion = "1.2.0"
MinEngineVersion specifies the minimum engine version accepted by OTF.
TODO: This originally applied only to terraform before tofu was added as an alternative engine. Tofu's earliest version is 1.6.0, which should really be the minimum version if tofu is the selected engine.
Variables ¶
var ( // Default is the default for setting the default engine. // // NOTE: the actual default engine that has been set by the user should be // retrieved via the daemon config. Default = Terraform // Terraform is the terraform engine Terraform = &Engine{engine: &terraform{}} // Tofu is the opentofu engine Tofu = &Engine{engine: &tofu{}} // ErrInvalidVersion is returned when a engine version string is // not a semantic version string (major.minor.patch). ErrInvalidVersion = errors.New("invalid engine version") )
var DefaultBinDir = path.Join(os.TempDir(), "otf-engine-bins")
Functions ¶
func NewDownloader ¶ added in v0.3.21
func NewDownloader(engine engineSource, destdir string) *downloader
NewDownloader constructs a terraform downloader, with destdir set as the parent directory into which the binaries are downloaded. Pass an empty string to use a default.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) MarshalText ¶
func (*Engine) UnmarshalText ¶
type Service ¶ added in v0.3.21
func NewService ¶ added in v0.3.21
func (*Service) GetLatest ¶ added in v0.3.21
GetLatest returns the latest engine version and the time when it was fetched; if it has not yet been fetched then the default version is returned instead along with zero time.
func (*Service) StartLatestChecker ¶ added in v0.3.21
StartLatestChecker starts the latest checker go routine, checking the latest version of each engine on a regular interval.