Documentation
¶
Overview ¶
Package checkrun sees a queued check through for the command line: run here where no serve leads, or followed where one does, its progress and its results reported as they come, and what a failure's log says. It is part 4, item 2's "run library", named so it doesn't take the name every command gives a run. It decides nothing the engine doesn't, and imports no verb.
Index ¶
- func BaselineWords(base, branch model.TargetResult, check string) string
- func Follow(ctx context.Context, e *engine.Engine, session *coord.Session, run model.Run, ...) error
- func FollowFor(ctx context.Context, e *engine.Engine, run model.Run, streams term.Streams, ...) error
- func QueuedFor(ctx context.Context, e *engine.Engine, run model.Run, streams term.Streams, ...) error
- func Report(ctx context.Context, e *engine.Engine, run model.Run, streams term.Streams, ...) error
- func Result(ctx context.Context, e *engine.Engine, run model.Run) (view.CheckJSON, error)
- func RunQueued(ctx context.Context, e *engine.Engine, run model.Run, streams term.Streams, ...) error
- func StopWords(run model.Run, wasQueued bool) string
- func StoppedExit(run model.Run, evidence engine.Evidence) error
- func Wait(ctx context.Context, e *engine.Engine, run model.Run, streams term.Streams, ...) error
- func WaitFor(ctx context.Context, e *engine.Engine, run model.Run, streams term.Streams, ...) error
- func WriteBaselineResults(out io.Writer, base, branch engine.Evidence)
- type Bound
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaselineWords ¶
func BaselineWords(base, branch model.TargetResult, check string) string
func FollowFor ¶ added in v0.8.0
func FollowFor(ctx context.Context, e *engine.Engine, run model.Run, streams term.Streams, places config.Places, named bool, bound Bound) error
FollowFor follows a run that serve or a worker drives for at most bound, driving nothing, and reports it where it ends within the bound; one still queued or running then is a StillRunning refusal, in the words of the journal's latest progress or wait, with the wait that follows it further. Ctrl-C is Interrupted, as Follow's.
func QueuedFor ¶ added in v0.8.0
func QueuedFor(ctx context.Context, e *engine.Engine, run model.Run, streams term.Streams, places config.Places, bound Bound, drain func() (int, error)) error
QueuedFor follows a run check --for queued, as -d queues it, for at most bound: said as -d says who runs it, serve or a background worker drain starts, then followed (FollowFor). Where nothing leads and no worker starts, it's refused, the check left queued.
func Report ¶
func Report(ctx context.Context, e *engine.Engine, run model.Run, streams term.Streams, places config.Places, named bool) error
Report prints a finished run's results and returns the exit its outcome calls for; named is where the command named what it checked already.
func Result ¶ added in v0.8.0
checkResult is a run's --json result, without its targets' results. Result is a check's object as wait and check --json give it before it ends: its branch, revision, plan, and run (checkResult).
func RunQueued ¶
func RunQueued(ctx context.Context, e *engine.Engine, run model.Run, streams term.Streams, enqueue bool, places config.Places, drain func() (int, error)) error
RunQueued sees a queued run through (Design v3 §11): handed to serve and followed when serve leads, otherwise run here; with enqueue, only queued, saying whether anything will run it, by a background drain that drain starts where nothing leads.
func StopWords ¶
StopWords say what cancelling a check did: one only queued is cancelled before it started, and one running keeps what it finished.
func StoppedExit ¶
StoppedExit says what a check that was stopped leaves: what it finished, or nothing, when it finished nothing, as one cancelled while queued.
func Wait ¶ added in v0.7.0
func Wait(ctx context.Context, e *engine.Engine, run model.Run, streams term.Streams, places config.Places) error
Follow shows a run's progress until it ends, driving it here where nobody else sees it through, after before says who does, and reports its outcome; named is where the command named what it checks already. Wait follows a check until it ends and reports it, as dockhand wait does: one that ended is reported; with serve running, this observes; with no serve, it runs here, as a foreground check would.
func WaitFor ¶ added in v0.8.0
func WaitFor(ctx context.Context, e *engine.Engine, run model.Run, streams term.Streams, places config.Places, bound Bound, drain func() (int, error)) error
WaitFor follows a check for at most bound, as dockhand wait --for does, and never drives it here: where nothing leads it, a background worker is started (drain) and followed. One that ended, or ends within the bound, is reported; one still queued or running at the bound is a StillRunning refusal, the check continuing.
func WriteBaselineResults ¶
WriteBaselineResults sets each port's result at the base beside the branch's, in each environment where the baseline built it, and where the check failed it but master doesn't build it. A baseline rebuilds a port only where it failed, so elsewhere there is nothing to set beside.
Types ¶
type Bound ¶ added in v0.8.0
Bound is how long --for follows a check, as the person wrote it, which the words and the Next repeat.
func ParseBound ¶ added in v0.8.0
ParseBound reads --for's value: a duration in Go's forms, 9m, 90s, 1h30m, above zero; a bare number is refused for its missing unit.