provisioner

package
v0.455.7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-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 Executor

type Executor interface {
	// Stage returns the stage that the executor belongs to.
	// Prepare prepares the executor for execution.
	Prepare(ctx context.Context, input state.State) error
	// Execute executes the executor, returning the next states.
	Execute(ctx context.Context) ([]state.State, error)
}

Executor executes a single step in provisioner execution. It transforms a set of states into their next stages.

type Handler

type Handler struct {
	Executor Executor
	Handles  []state.State
}

type Runner

type Runner struct {
	State  []state.State
	Stages []RunnerStage
	// contains filtered or unexported fields
}

Runner runs a set of provision handlers on a set of input states.

It returns the final set of states after all handlers have been executed.

func (*Runner) AsyncTask added in v0.451.1

func (r *Runner) AsyncTask() *Task

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) ([]state.State, error)

type RunnerStage

type RunnerStage struct {
	Name     string
	Handlers []Handler
}

type Task added in v0.451.1

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

Task is an async running provisioner task.

func (*Task) Err added in v0.451.1

func (t *Task) Err() error

func (*Task) Outputs added in v0.451.1

func (t *Task) Outputs() []state.State

func (*Task) Start added in v0.451.1

func (t *Task) Start(oldCtx context.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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