sequence

package
v0.6.0-rc15 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecResult

type ExecResult struct {
	FQMN     string                       `json:"fqmn"`
	Response *request.CoordinatedResponse `json:"response"`
	RunErr   scheduler.RunErr             `json:"runErr"`  // runErr is an error returned from a Runnable.
	ExecErr  string                       `json:"execErr"` // err is an annoying workaround that allows runGroup to propogate non-RunErrs out of its loop. Should be refactored when possible.
}

type Sequence

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

func FromJSON

func FromJSON(seqJSON []byte, req *request.CoordinatedRequest) (*Sequence, error)

FromJSON creates a sequence from a JSON-encoded set of steps.

func New

func New(workflowSteps []tenant.WorkflowStep, req *request.CoordinatedRequest) (*Sequence, error)

New creates a new Sequence.

func (*Sequence) HandleStepResults

func (seq *Sequence) HandleStepResults(results []ExecResult) error

func (*Sequence) NextStep

func (seq *Sequence) NextStep() *Step

NextStep returns the first un-complete step, nil if the sequence is over.

func (*Sequence) ParentID

func (seq *Sequence) ParentID() string

ParentID returns the parent ID for this sequence

func (*Sequence) Request

func (seq *Sequence) Request() *request.CoordinatedRequest

Request returns the request for this sequence

func (*Sequence) StepsJSON

func (seq *Sequence) StepsJSON() ([]byte, error)

StepsJSON returns the JSON of the steps it is working on.

type Step

type Step struct {
	tenant.WorkflowStep `json:"inline"`
	Completed           bool `json:"completed"`
}

Step is a container over WorkflowStep that includes a 'Completed' field.

Jump to

Keyboard shortcuts

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