Documentation
¶
Overview ¶
Package launch joins a run's start to its engine in a process of the run's own (spec 4.1.5, 4.1.9). In the command that starts a run, it has start check and record the run, with what the run's process runs with kept in its record from its first event, then starts that process detached: terrace's own hidden command, handed the run's lease. In that process, it takes the lease up, reads what the run runs with, and has the engine take the run to its close.
What the process runs with is the engine's Spec, mapped from the start: its units, root, policy and its offer's, accounts, source map, parallelism and data-holding types, and whether the delete sign-in is set up (5.1.6), which the AWS config says without signing in.
Index ¶
Constants ¶
const LeaseFD = 3
LeaseFD is the file the run's process finds the run's lease on: the first after stderr.
const ProcessCommand = "__run"
ProcessCommand is terrace's hidden command that runs a run in its own process, its Opening's arguments after it.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Launcher ¶
type Launcher struct {
// Starter checks and records each run. Launch has it encode the run's
// input as the run's process reads it, whatever its own Input says.
Starter start.Starter
Profiles Profiles
Detacher Detacher
// Self is terrace's own binary, which the run's process runs.
Self string
// Environ is terrace's own environment, which the run's process gets
// whole, as Terragrunt's runs start from it (spec 6.2).
Environ []string
}
Launcher starts runs, each in a detached process of terrace's own.
func (Launcher) Launch ¶
Launch starts in's run and detaches its process, and is the run as it stands once that process has started. A refusal is start's, and the run gets no code and no record (4.1.2). Once the run is recorded, a failure is a *RunError carrying the run: a process that couldn't start has left a record whose lease no process holds, which the next command that reads it closes as failed (4.6.6); one that started goes on, and must never be started again. Once the run is recorded, ctx ending doesn't stop its process starting.
type Opening ¶
type Opening struct {
Code seam.Code
// Dir, Identity and LongestPlanExpiry open the run's records, as
// record.Config holds them.
Dir string
Identity repo.Identity
LongestPlanExpiry time.Duration
}
Opening is what the run's process opens its run with: its code, and what opens the records it's kept in.
func ParseOpening ¶
ParseOpening reads an Opening from the arguments the run's process is started with, after ProcessCommand.
type Process ¶
type Process struct {
Engine engine.Engine
// Host is this machine, as machine.This gives it, which the records
// judge runs' liveness by.
Host seam.Host
}
Process runs a run in the process launched for it.
type Profiles ¶
type Profiles interface {
Profile(ctx context.Context, name config.ProfileName) (cloud.Profile, bool, error)
}
Profiles says what the AWS config holds of a profile, as cloud.Cloud does.