Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StopAfterCancel ¶
func StopAfterCancel(_ *RunnerResult) bool
func StopOnFailure ¶
func StopOnFailure(result *RunnerResult) bool
Returns true (stop the runner) when the last command returned non 0 exit code.
func StopOnSuccess ¶
func StopOnSuccess(result *RunnerResult) bool
Types ¶
type ExecutionResult ¶
func ExecuteToStdout ¶
func ExecuteToStdout(command string) (out *ExecutionResult)
type Executor ¶
type Executor func(string) *ExecutionResult
type Runner ¶
type Runner struct { Command string Exec Executor Condition RunnerStopCheck // contains filtered or unexported fields }
func (*Runner) Loop ¶
func (r *Runner) Loop() *RunnerResult
type RunnerResult ¶
type RunnerResult struct { Command string Attempts uint Performance *TimingStatistics LastExitCode int }
func (*RunnerResult) Record ¶
func (rr *RunnerResult) Record(result *ExecutionResult)
func (*RunnerResult) String ¶
func (rr *RunnerResult) String() string
type RunnerStopCheck ¶
type RunnerStopCheck func(*RunnerResult) bool
Takes a runner result and returns if the runner should stop or not.
func StopAfterRuns ¶
func StopAfterRuns(runs int) RunnerStopCheck
type TimingStatistics ¶
type TimingStatistics struct { Fastest time.Duration Slowest time.Duration Average time.Duration Total time.Duration // contains filtered or unexported fields }
func (*TimingStatistics) Record ¶
func (t *TimingStatistics) Record(in time.Duration)
func (*TimingStatistics) String ¶
func (t *TimingStatistics) String() string
Click to show internal directories.
Click to hide internal directories.