runner

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opt

type Opt func(*Runner)

Opt are functional optionals for Runner

func WithDiagnostics

func WithDiagnostics(ds ...diagnostics.Diagnostic) Opt

WithDiagnostics sets the diagnostics the runner will use. If not set, it will use all registered ones

func WithMatchingTags

func WithMatchingTags(tagFilters []diagnostics.TagFilter) Opt

func WithSkipCleanupPhase

func WithSkipCleanupPhase(skip bool) Opt

WithSkipCleanupPhase will skip the cleanup phase if set to true. Defaults to false

func WithSkipGeneratePhase

func WithSkipGeneratePhase(skip bool) Opt

WithSkipGeneratePhase will skip the generate phase if set to true. Defaults to false

func WithSkipVerifyPhase

func WithSkipVerifyPhase(skip bool) Opt

WithSkipVerifyPhase will skip the verify phase if set to true. Defaults to false

func WithTestContext

func WithTestContext(tstContext diagnostics.TestContext) Opt

WithTestContext sets the test context to use. The default one will not be able to talk to deployment service

type Reporter

type Reporter interface {
	ReportGenerateStart(componentName string)
	ReportGenerateSuccess(componentName string)
	ReportGenerateErrored(componentName string, msg string)

	ReportVerifyStart(componentName string)
	ReportVerifyFinish(componentName string)
	ReportVerifyFailure(componentName string, msg string)

	ReportCleanupStart(componentName string)
	ReportCleanupSuccess(componentName string)
	ReportCleanupErrored(componentName string, msg string)

	SummarizeFailures()
}

A Reporter is used to report runner lifecycle events

func NewDefaultReporter

func NewDefaultReporter() Reporter

NewDefaultReporter creates a reporter that pretty prints messages and does all the fancy progress spinner stuff

type Runner

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

Runner is responsible for running diagnostics

func New

func New(opts ...Opt) *Runner

New returns a new Runner

func (*Runner) Run

func (r *Runner) Run() error

Run runs the diagnostics

Jump to

Keyboard shortcuts

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