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

exec

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package exec is the builtin Orchard provider for shell command execution. One action — "run" — runs a program with optional args/env/stdin/cwd and captures stdout, stderr, and exit code.

Non-zero exit is an error by default. That matches the most common use case (run a migration script, then do X) without introducing a scenario-level notion of conditional branching. Scenarios that want to tolerate failures will need the future retry block or an explicit "expected exit codes" attribute — neither is wired yet.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider is the cmd provider implementation.

func New

func New() *Provider

New returns an unconfigured cmd provider. Schema is parsed once up front so any error in the embedded schema.hcl fails loudly at binary startup rather than at first use.

func (*Provider) Close

func (p *Provider) Close() error

Close has nothing to release.

func (*Provider) Configure

func (p *Provider) Configure(_ context.Context, config map[string]cty.Value) error

Configure captures provider-level defaults (cwd, env) that every action inherits unless it overrides.

func (*Provider) Execute

func (p *Provider) Execute(ctx context.Context, action string, attrs map[string]cty.Value) (map[string]cty.Value, error)

Execute dispatches to run.

func (*Provider) Schema

func (p *Provider) Schema() protocol.ProviderSchema

Schema returns the embedded provider schema.

Jump to

Keyboard shortcuts

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