workflow

package
v0.0.0-...-746c951 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EndState

type EndState int8

EndStates are the final states after a run of a workflow.

const (
	// ESUnknown indicates we haven't reached an end state.
	ESUnknown EndState = 0
	// ESSuccess means that the workflow has completed successfully. This
	// does not mean there haven't been failurea.
	ESSuccess EndState = 1
	// ESPreconditionFailure means no work was done as we failed on a precondition.
	ESPreconditionFailure EndState = 2
	// ESCanaryFailure indicates one of the canaries failed, stopping the workflow.
	ESCanaryFailure EndState = 3
	// ESMaxFailures indicates that the workflow passed the canary phase, but failed
	// at a later phase.
	ESMaxFailures EndState = 4
)

type Status

type Status struct {
	// Failures is a list of failed actiona.
	Failures []*actions.Actions
	// EndState is the EndState of the workflow.
	EndState EndState
}

Status is the status of a workflow after it has run.

type Workflow

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

Workflow represents our rollout Workflow.

func New

func New(config *config.Config, lb *client.Client) (*Workflow, error)

New creates a new workflow.

func (*Workflow) RetryFailed

func (w *Workflow) RetryFailed(ctx context.Context)

RetryFailed retries all failed actiona. This is only used if

func (*Workflow) Run

func (w *Workflow) Run(ctx context.Context) error

Runs runs our workflow on the supplied "actions" doing "canaryNum" canaries, then running "concurrency" number of actions that will stop at "maxFailures" number of failurea.

func (*Workflow) Status

func (w *Workflow) Status() Status

Status will return the workflow's status after run() has completed

Jump to

Keyboard shortcuts

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