Documentation
¶
Index ¶
- func BuildExecutionWorkflow(wf *config.Workflow, phaseName string) (*config.Workflow, error)
- func BundleSHA256Hex(path string) (string, error)
- func DiscoverApplyWorkflow(ctx context.Context, bundleRoot string) (string, error)
- func Execute(ctx context.Context, opts ExecuteOptions) (err error)
- func ExecutePlan(ctx context.Context, opts PlanOptions) error
- func FetchWorkflowForValidation(ctx context.Context, rawURL string) ([]byte, error)
- func HasWorkflowDir(root string) bool
- func IsHTTPWorkflowPath(raw string) bool
- func LoadInstallDryRunState(request ExecutionRequest) (*install.State, error)
- func ResolveApplyWorkflowAndBundle(ctx context.Context, opts InvocationOptions) (string, string, error)
- func ResolveBundleRoot(positionalBundle string) (string, error)
- func ResolveInstallStatePath(wf *config.Workflow) (string, error)
- func ResolveInstallStatePathForWorkflowPath(wf *config.Workflow, workflowPath string, stateDir string) (string, error)
- func ResolveInstallStatePathWithDir(wf *config.Workflow, stateDir string) (string, error)
- func ResolvePlanWorkflowPath(ctx context.Context, opts InvocationOptions) (string, error)
- func RunApplyCommand(ctx context.Context, opts ApplyCommandOptions) error
- func RunPlanCommand(ctx context.Context, opts PlanCommandOptions) error
- type ApplyCommandOptions
- type ExecuteOptions
- type ExecutionRequest
- type ExecutionRequestOptions
- type InvocationOptions
- type PlanCommandOptions
- type PlanOptions
- type PlanReport
- type PlanStep
- type PlanSummary
- type RunLogger
- type StateRequestOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildExecutionWorkflow ¶
func BundleSHA256Hex ¶
func DiscoverApplyWorkflow ¶
func ExecutePlan ¶
func ExecutePlan(ctx context.Context, opts PlanOptions) error
func HasWorkflowDir ¶
func IsHTTPWorkflowPath ¶
func LoadInstallDryRunState ¶
func LoadInstallDryRunState(request ExecutionRequest) (*install.State, error)
func ResolveBundleRoot ¶
func ResolveInstallStatePathForWorkflowPath ¶ added in v0.2.9
func ResolveInstallStatePathWithDir ¶ added in v0.2.9
func ResolvePlanWorkflowPath ¶
func ResolvePlanWorkflowPath(ctx context.Context, opts InvocationOptions) (string, error)
func RunApplyCommand ¶ added in v0.2.0
func RunApplyCommand(ctx context.Context, opts ApplyCommandOptions) error
func RunPlanCommand ¶ added in v0.2.0
func RunPlanCommand(ctx context.Context, opts PlanCommandOptions) error
Types ¶
type ApplyCommandOptions ¶ added in v0.2.0
type ApplyCommandOptions struct {
WorkflowPath string
BundleRoot string
WorkflowSource string
Scenario string
SelectedPhase string
Fresh bool
StateDir string
StateDirExplicit bool
DryRun bool
NonInteractive bool
VarOverrides map[string]any
VarsFiles []string
Hostname string
DetectHostname func() (string, error)
Verbosef func(level int, format string, args ...any) error
StdoutPrintf func(format string, args ...any) error
StdoutPrintln func(args ...any) error
InvocationID string
AdditionalSink install.StepEventSink
NewRunLogger func(workflowPath, workflowSource, scenario, bundleRoot, selectedPhase string) (RunLogger, error)
}
type ExecuteOptions ¶
type ExecuteOptions struct {
Request ExecutionRequest
BundleRoot string
Context workflowcontext.Context
WorkflowSource string
Scenario string
DryRun bool
NonInteractive bool
Verbosef func(level int, format string, args ...any) error
StdoutPrintf func(format string, args ...any) error
StdoutPrintln func(args ...any) error
InvocationID string
AdditionalSink install.StepEventSink
NewRunLogger func(workflowPath, workflowSource, scenario, bundleRoot, selectedPhase string) (RunLogger, error)
}
type ExecutionRequest ¶
type ExecutionRequest struct {
WorkflowPath string
Workflow *config.Workflow
Fresh bool
SelectedPhase string
ExecutionWorkflow *config.Workflow
StatePath string
StateDir string
StateDirExplicit bool
StateMigrationSink func(source string, target string)
RemoteWorkflow bool
}
func ResolveExecutionRequest ¶
func ResolveExecutionRequest(ctx context.Context, opts ExecutionRequestOptions) (ExecutionRequest, error)
func ResolveStateRequest ¶ added in v0.2.9
func ResolveStateRequest(ctx context.Context, opts StateRequestOptions) (ExecutionRequest, error)
type ExecutionRequestOptions ¶
type ExecutionRequestOptions struct {
CommandName string
WorkflowPath string
DiscoverWorkflow func(context.Context) (string, error)
AllowRemoteWorkflow bool
NormalizeLocalWorkflowPath bool
VarOverrides map[string]any
VarsFiles []string
NodeScopedVars bool
Hostname string
DetectHostname func() (string, error)
Fresh bool
SelectedPhase string
DefaultPhase string
BuildExecutionWorkflow bool
ResolveStatePath bool
StatePathFromExecutionTarget bool
StateDir string
StateDirExplicit bool
}
type InvocationOptions ¶
type PlanCommandOptions ¶ added in v0.2.0
type PlanCommandOptions struct {
WorkflowPath string
Scenario string
SelectedPhase string
Output string
StateDir string
StateDirExplicit bool
VarOverrides map[string]any
VarsFiles []string
Hostname string
DetectHostname func() (string, error)
Verbosef func(level int, format string, args ...any) error
StdoutPrintf func(format string, args ...any) error
JSONEncoderFunc func() *json.Encoder
ResolveOutput func(string) (string, error)
}
type PlanOptions ¶
type PlanReport ¶
type PlanReport struct {
WorkflowPath string `json:"workflowPath"`
SelectedPhase string `json:"selectedPhase,omitempty"`
StatePath string `json:"statePath"`
RuntimeVarKeys []string `json:"runtimeVarKeys,omitempty"`
Context map[string]any `json:"context,omitempty"`
Summary PlanSummary `json:"summary"`
Steps []PlanStep `json:"steps"`
}
func BuildPlanReport ¶
func BuildPlanReport(request ExecutionRequest) (PlanReport, error)
func BuildPlanReportWithContext ¶ added in v0.2.6
func BuildPlanReportWithContext(request ExecutionRequest, context map[string]any) (PlanReport, error)
type PlanStep ¶
type PlanStep struct {
Phase string `json:"phase,omitempty"`
ID string `json:"id"`
Kind string `json:"kind"`
Action string `json:"action"`
Reason string `json:"reason,omitempty"`
When string `json:"when,omitempty"`
Retry int `json:"retry,omitempty"`
Timeout string `json:"timeout,omitempty"`
Register map[string]string `json:"register,omitempty"`
WhenEvaluated bool `json:"whenEvaluated,omitempty"`
}
type PlanSummary ¶
type PlanSummary struct {
TotalSteps int `json:"totalSteps"`
RunSteps int `json:"runSteps"`
SkipSteps int `json:"skipSteps"`
SkipCompleted int `json:"skipCompleted"`
SkipWhen int `json:"skipWhen"`
PhaseCount int `json:"phaseCount"`
CompletedPhases int `json:"completedPhases"`
RuntimeVarCount int `json:"runtimeVarCount"`
}
Click to show internal directories.
Click to hide internal directories.