context

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MPL-2.0-no-copyleft-exception Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// CLIContext is the urfave/cli.Context for managing CLI flags and other
	// functionality.
	CLIContext *cli.Context
}

Context is the set of data generated from the runner framework controller code, but formatted to be sent to implementing hooks of the Runner interface.

Please note that not all situations will call for all data to be represented, so check your struct values (or the docs) before using things.

type RunContext

type RunContext struct {
	*Context

	// QueueItem is the item of the upcoming run; used in BeforeNextRun() and Run()
	QueueItem *model.QueueItem
	// RunStart is the time the run started. Populated only for Run().
	Start time.Time
	// RunCtx is the context.Context for the run; if closed the run should be canceled.
	Ctx context.Context
	// RunCancelFunc is the cancel func to close the above context.
	CancelFunc context.CancelFunc
}

RunContext is specific to the run functions in fw; supplying additional data.

Jump to

Keyboard shortcuts

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