executor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package executor provides the step execution interface and built-in executors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandExecutor

type CommandExecutor struct{}

CommandExecutor runs shell commands.

func (*CommandExecutor) Execute

func (e *CommandExecutor) Execute(ctx context.Context, step model.Step, env map[string]string) Result

type Executor

type Executor interface {
	Execute(ctx context.Context, step model.Step, env map[string]string) Result
}

Executor defines the interface for step execution.

func New

func New(stepType string) (Executor, error)

New creates an executor based on the step type.

type HTTPExecutor

type HTTPExecutor struct{}

HTTPExecutor performs HTTP requests.

func (*HTTPExecutor) Execute

func (e *HTTPExecutor) Execute(ctx context.Context, step model.Step, env map[string]string) Result

type Result

type Result struct {
	Output   string
	ExitCode int
	Error    error
}

Result holds the output of an executor run.

type ScriptExecutor

type ScriptExecutor struct{}

ScriptExecutor writes a script to a temp file and executes it.

func (*ScriptExecutor) Execute

func (e *ScriptExecutor) Execute(ctx context.Context, step model.Step, env map[string]string) Result

Jump to

Keyboard shortcuts

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