workflow

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EvaluationTask

type EvaluationTask func(runner build.Runner, outputContext *OutputContext) error

EvaluationTask is a task that can be registered to the workflow so when the workflow starts it will be injected with the runner and output context for editing

type OutputContext

type OutputContext struct {
	// If golang has generic, this dependency to domain wouldn't even be here
	ImageDependencies []build.ImageDependencies
}

OutputContext are the output context for a workflow currently the only thing it outputs are image dependencies

type RunningTask

type RunningTask func(runner build.Runner) error

RunningTask is similar to ExecutionTask and you can register to the workflow except that running task does not care about the output context

type Workflow

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

Workflow describe units of works that the builder performs

func NewWorkflow

func NewWorkflow() *Workflow

NewWorkflow creates an empty workflow with empty context

func (*Workflow) GetOutputs

func (w *Workflow) GetOutputs() *OutputContext

GetOutputs return the build outputs

func (*Workflow) Run

func (w *Workflow) Run(runner build.Runner) error

Run all items that are previously compiled in the workflow

func (*Workflow) ScheduleEvaluation

func (w *Workflow) ScheduleEvaluation(context *build.BuilderContext, task EvaluationTask)

ScheduleEvaluation schedule a execution and its context to run when the workflow runs

func (*Workflow) ScheduleRun

func (w *Workflow) ScheduleRun(context *build.BuilderContext, task RunningTask)

ScheduleRun schedule a RunningTask and its context to run when the workflow runs

Jump to

Keyboard shortcuts

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