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) Configure ¶
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.