Help us shape the future of Go! Take the 2026 Go Developer Survey

executor

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDockerImage = "ubuntu:22.04"
	WorkspaceMountPath = "/workspace"
)

Variables

This section is empty.

Functions

func EnvironmentFromList

func EnvironmentFromList(values []string) map[string]string

func EnvironmentList

func EnvironmentList(env map[string]string) []string

func JobEnvironment

func JobEnvironment(values map[string]interface{}) map[string]string

func MergeEnvironment

func MergeEnvironment(envs ...map[string]string) map[string]string

func NormalizeRunnerName

func NormalizeRunnerName(name string) string

func ResolveDockerImage

func ResolveDockerImage(runsOn string) string

func Supported

func Supported() []string

Types

type ExecContext

type ExecContext struct {
	Context            context.Context
	WorkspaceDir       string
	WorkDir            string
	UseWorkDirOverride bool
	BaseEnv            map[string]string
	JobEnv             map[string]string
	StepEnv            map[string]string
	Env                map[string]string
	Runtime            RuntimeContext
	Stdout             io.Writer
	Stderr             io.Writer
	DryRun             bool
}

ExecContext carries runtime settings for a single executor invocation.

type Executor

type Executor interface {
	Name() string
	Prepare(ctx ExecContext) error
	RunStep(ctx ExecContext, job model.PlanJob, step model.PlanStep) (output string, err error)
	Cleanup(ctx ExecContext) error
}

Executor runs plan steps using a specific backend.

func Get

func Get(name string) (Executor, error)

type JobFinalizer

type JobFinalizer interface {
	FinalizeJob(ctx ExecContext, job model.PlanJob) (output string, err error)
}

JobFinalizer is implemented by executors that need job-level cleanup or post-step handling.

type RuntimeContext

type RuntimeContext struct {
	Runner      string
	Environment string
}

RuntimeContext captures the selected execution backend and environment class.

Jump to

Keyboard shortcuts

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