do

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildRunnerError

type ChildRunnerError struct {
	Parent string
	Child  string
	// contains filtered or unexported fields
}

func (ChildRunnerError) Error

func (e ChildRunnerError) Error() string

func (ChildRunnerError) Unwrap

func (e ChildRunnerError) Unwrap() error

type Do

type Do struct {
	Runners     []runner.Runner `json:"runners"`
	Label       string          `json:"label"`
	Description string          `json:"description"`
	// contains filtered or unexported fields
}

Do is a runner that wraps a collection of runners and executes each of them in a goroutine. It returns a map associating each runner's Op to its ID.

func New

func New(l hclog.Logger, label, description string, runners []runner.Runner) *Do

New initializes a Do runner.

func (Do) ID

func (d Do) ID() string

func (Do) Run

func (d Do) Run() op.Op

Run asynchronously executes all Runners and returns the resulting ops when the last one has finished

type Seq

type Seq struct {
	Runners     []runner.Runner `json:"runners"`
	Label       string          `json:"label"`
	Description string          `json:"description"`
	Timeout     runner.Timeout  `json:"timeout"`
	// contains filtered or unexported fields
}

Seq wraps a collection of runners and executes them in order, returning all of their Ops keyed by their ID(). If one of the runners has a status other than Success, subsequent runners will not be executed and the Seq will return a status.Fail.

func NewSeq

func NewSeq(cfg SeqConfig) *Seq

NewSeq initializes a Seq runner.

func NewSeqWithContext

func NewSeqWithContext(ctx context.Context, cfg SeqConfig) *Seq

func (Seq) ID

func (s Seq) ID() string

func (Seq) Run

func (s Seq) Run() op.Op

Run executes the Command

type SeqConfig

type SeqConfig struct {
	Runners     []runner.Runner
	Label       string
	Description string
	Timeout     runner.Timeout
	Logger      hclog.Logger
}

Jump to

Keyboard shortcuts

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