install

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStepCommandTimeout = errors.New("step command timeout")

Functions

func CurrentHostFacts added in v0.2.0

func CurrentHostFacts() map[string]any

func DefaultStatePath

func DefaultStatePath(wf *config.Workflow) (string, error)

func EvaluateWhen

func EvaluateWhen(expr string, vars map[string]any, runtime map[string]any) (bool, error)

func EvaluateWhenWithContext added in v0.2.6

func EvaluateWhenWithContext(expr string, vars map[string]any, runtime map[string]any, context map[string]any) (bool, error)

func LegacyStatePath

func LegacyStatePath(wf *config.Workflow) (string, error)

func ResolveStateReadPathForWorkflow

func ResolveStateReadPathForWorkflow(wf *config.Workflow, preferredPath string) (string, error)

func ResolveStateReadPathForWorkflowNoFallback added in v0.2.9

func ResolveStateReadPathForWorkflowNoFallback(wf *config.Workflow, preferredPath string) (string, error)

func ResolveStateReadPathForWorkflowWithMigrationSink added in v0.2.9

func ResolveStateReadPathForWorkflowWithMigrationSink(wf *config.Workflow, preferredPath string, migrationSink func(source string, target string)) (string, error)

func Run

func Run(ctx context.Context, wf *config.Workflow, opts RunOptions) error

func SaveRawStateFile added in v0.2.9

func SaveRawStateFile(path string, raw []byte) error

func SaveState

func SaveState(path string, st *State) error

func SaveStateWithMetadata added in v0.2.9

func SaveStateWithMetadata(path string, st *State, metadata StateMetadata) error

func StatePathInDir added in v0.2.9

func StatePathInDir(wf *config.Workflow, stateDir string) (string, error)

func XDGApplyStatePath added in v0.2.9

func XDGApplyStatePath(wf *config.Workflow) (string, error)

func XDGStatePath added in v0.2.9

func XDGStatePath(wf *config.Workflow) (string, error)

Types

type ExecutionContext

type ExecutionContext struct {
	BundleRoot   string
	StatePath    string
	Context      workflowcontext.Context
	Interaction  operatorio.Interface
	SecretValues []string
	// contains filtered or unexported fields
}

func (ExecutionContext) RenderContext

func (c ExecutionContext) RenderContext() map[string]any

type RunOptions

type RunOptions struct {
	BundleRoot           string
	StatePath            string
	StateMetadata        StateMetadata
	DisableStateFallback bool
	StateMigrationSink   func(source string, target string)
	Context              workflowcontext.Context
	EventSink            StepEventSink
	Fresh                bool
	Interaction          operatorio.Interface
	NonInteractive       bool
	// contains filtered or unexported fields
}

type RuntimeSecret added in v0.2.9

type RuntimeSecret struct {
	Phase  string `json:"phase,omitempty"`
	StepID string `json:"stepID,omitempty"`
	Output string `json:"output,omitempty"`
}

type State

type State struct {
	Version         int                      `json:"-"`
	Kind            string                   `json:"-"`
	StateKey        string                   `json:"-"`
	Workflow        StateWorkflow            `json:"-"`
	Status          string                   `json:"-"`
	CreatedAt       string                   `json:"-"`
	UpdatedAt       string                   `json:"-"`
	Phase           string                   `json:"phase,omitempty"`
	CompletedPhases []string                 `json:"completedPhases,omitempty"`
	FailedPhase     string                   `json:"failedPhase,omitempty"`
	RuntimeVars     map[string]any           `json:"runtimeVars,omitempty"`
	RuntimeSecrets  map[string]RuntimeSecret `json:"runtimeSecrets,omitempty"`
	Error           string                   `json:"error,omitempty"`
}

func LoadState

func LoadState(path string) (*State, error)

func (*State) UnmarshalJSON added in v0.2.9

func (st *State) UnmarshalJSON(content []byte) error

type StateMetadata added in v0.2.9

type StateMetadata struct {
	StateKey string
	Workflow StateWorkflow
	Now      func() time.Time
}

type StateWorkflow added in v0.2.9

type StateWorkflow struct {
	Path   string `json:"path,omitempty"`
	Source string `json:"source,omitempty"`
	SHA256 string `json:"sha256,omitempty"`
}

type StepEvent

type StepEvent struct {
	InvocationID   string
	Event          string
	StepID         string
	Kind           string
	Phase          string
	Status         string
	Reason         string
	Attempt        int
	StartedAt      string
	EndedAt        string
	Error          string
	BatchID        string
	ParallelGroup  string
	Parallel       bool
	BatchSize      int
	MaxParallelism int
	FailedStep     string
}

type StepEventSink

type StepEventSink func(StepEvent)

Jump to

Keyboard shortcuts

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