Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builtin ¶
type Builtin struct {
// contains filtered or unexported fields
}
Builtin runs a registered builtin function by name.
func NewBuiltin ¶
func NewBuiltin(loadedFrom runner.StepReference, params *runner.StepParams, funcDesc *runner.FunctionDescriptor, stepFuncFinder runner.StepFuncFinder) *Builtin
func (*Builtin) Run ¶
func (s *Builtin) Run(ctx context.Context, stepsCtx *runner.StepsContext) (*proto.StepResult, error)
type Exec ¶
type Exec struct {
// contains filtered or unexported fields
}
Exec is a function that executes a command.
func NewExec ¶
func NewExec(loadedFrom runner.StepReference, params *runner.StepParams, funcDesc *runner.FunctionDescriptor) *Exec
func (*Exec) Run ¶
func (s *Exec) Run(ctx context.Context, stepsCtx *runner.StepsContext) (*proto.StepResult, error)
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func NewParser ¶
func NewParser(resParser *resource.Parser, stepFuncFinder runner.StepFuncFinder) *Parser
func (*Parser) Parse ¶
func (p *Parser) Parse(globalCtx *runner.GlobalContext, funcDesc *runner.FunctionDescriptor, params *runner.StepParams, loadedFrom runner.StepReference) (runner.Function, error)
type Safe ¶ added in v0.34.0
type Safe struct {
// contains filtered or unexported fields
}
Safe wraps a Function with panic recovery. If the inner function panics, the panic is recovered and returned as a failure result with an internal error.
func WithPanicRecovery ¶ added in v0.34.0
WithPanicRecovery wraps fn so that panics during Run are recovered and returned as an internal error.
func (*Safe) Run ¶ added in v0.34.0
func (s *Safe) Run(ctx context.Context, stepsCtx *runner.StepsContext) (result *proto.StepResult, retErr error)
Run delegates to the inner function, recovering any panic as an internal error.
type Step ¶
type Step struct {
// contains filtered or unexported fields
}
Step resolves a function reference at runtime and delegates execution to the loaded function.
func NewStep ¶
func NewStep(globalCtx *runner.GlobalContext, parser runner.StepParser, stepReference *proto.Step, stepResource runner.StepResource) *Step
func (*Step) Run ¶
func (s *Step) Run(ctx ctx.Context, parentStepsCtx *runner.StepsContext) (*proto.StepResult, error)
Run fetches a step definition, parses the step, and executes it. The step reference inputs and environment are expanded. The current environment is cloned into params in preparation for a recursive call to Run.
type Steps ¶
type Steps struct {
// contains filtered or unexported fields
}
Steps runs a sequence of steps in order, accumulating their results.
func NewSteps ¶
func NewSteps(loadedFrom runner.StepReference, params *runner.StepParams, funcDesc *runner.FunctionDescriptor, steps ...runner.Function) *Steps
func (*Steps) Run ¶
func (s *Steps) Run(ctx ctx.Context, stepsCtx *runner.StepsContext) (*proto.StepResult, error)