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 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 See(ctx context.Context, e *engine.Engine, queued checks.Queued, ...) error
- func StopWords(run model.Run, wasQueued bool) string
- func StoppedExit(run model.Run, evidence engine.Evidence) error
- func WriteBaselineResults(out io.Writer, base, branch engine.Evidence)
- type Bound
- type Stay
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 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 See ¶ added in v0.9.0
func See(ctx context.Context, e *engine.Engine, queued checks.Queued, streams term.Streams, places config.Places, stay Stay, drain func() (int, error)) error
See stays with a check as stay says, given what admission answered: joined (Followed) or queued new. A check that already ended is reported, whatever the stay. To its end: driven here where nobody leads it, else followed. Detached: a worker started where nobody leads, and returned. Bounded: never driven here; a worker started where nobody leads, followed for the bound, and refused as still running at it. Detached and bounded together are refused. Capacity, leases and who leads stay the engine's.
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 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.