run

package
v0.0.0-...-afecb3f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2024 License: MPL-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCmd

func GetCmd(helper *cmdutil.Helper, signalWatcher *signals.Watcher) *cobra.Command

GetCmd returns the run command

Types

type BuildTargetState

type BuildTargetState struct {
	StartAt time.Time

	Duration time.Duration
	// Target which has just changed
	Label string
	// Its current status
	Status RunResultStatus
	// Error, only populated for failure statuses
	Err error
}

type Opts

type Opts struct {
	// contains filtered or unexported fields
}

Opts holds the current run operations configuration

type RunResult

type RunResult struct {
	// Timestamp of this event
	Time time.Time
	// Duration of this event
	Duration time.Duration
	// Target which has just changed
	Label string
	// Its current status
	Status RunResultStatus
	// Error, only populated for failure statuses
	Err error
}

RunResult represents a single event in the build process, i.e. a target starting or finishing building, or reaching some milestone within those steps.

type RunResultStatus

type RunResultStatus int

RunResultStatus represents the status of a target when we log a build result.

const (
	TargetBuilding RunResultStatus = iota
	TargetBuildStopped
	TargetBuilt
	TargetCached
	TargetBuildFailed
)

The collection of expected build result statuses.

type RunState

type RunState struct {
	Success int
	Failure int
	// Is the output streaming?
	Cached    int
	Attempted int
	// contains filtered or unexported fields
}

func NewRunState

func NewRunState(startedAt time.Time, tracingProfile string) *RunState

NewRunState creates a RunState instance for tracking events during the course of a run.

func (*RunState) Close

func (r *RunState) Close(terminal cli.Ui, filename string) error

Close finishes a trace of a titan run. The tracing file will be written if applicable, and run stats are written to the terminal

func (*RunState) Run

func (r *RunState) Run(label string) func(outcome RunResultStatus, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL