executors

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Help

func Help(
	scripts map[string]config.ShuttlePlanScript,
	script string,
	output io.Writer,
	template string,
) error

Types

type ActionExecutionContext

type ActionExecutionContext struct {
	ScriptContext ScriptExecutionContext
	Action        config.ShuttleAction
	ActionIndex   int
}

ActionExecutionContext gives context to the execution of Actions in a script

type Executor

type Executor func(context.Context, *ui.UI, ActionExecutionContext) error

func ShellExecutor

func ShellExecutor(action config.ShuttleAction) (Executor, bool)

func TaskExecutor

func TaskExecutor(action config.ShuttleAction) (Executor, bool)

type Matcher

type Matcher func(config.ShuttleAction) (Executor, bool)

type Registry

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

func NewRegistry

func NewRegistry(executors ...Matcher) *Registry

func (*Registry) Execute

func (r *Registry) Execute(
	ctx context.Context,
	p config.ShuttleProjectContext,
	command string,
	args map[string]string,
	validateArgs bool,
) error

Execute is the command executor for the plan files

type ScriptExecutionContext

type ScriptExecutionContext struct {
	ScriptName string
	Script     config.ShuttlePlanScript
	Project    config.ShuttleProjectContext
	Args       map[string]string
}

ScriptExecutionContext gives context to the execution of a plan script

Directories

Path Synopsis
golang

Jump to

Keyboard shortcuts

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