pipeline

package
v0.1.0-dev.20260127205208 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectPlatform

func DetectPlatform() string

DetectPlatform converts host.Platform to registry platform string. Examples: "Darwin", "Linux", "Linux.Debian", "Linux.Fedora", "Windows"

Types

type ExecutionResult

type ExecutionResult struct {
	Package   string
	Operation Operation
	Platform  string
	Started   time.Time
	Completed time.Time
	Duration  time.Duration
	Success   bool
	Phases    []PhaseResult
	Error     error
}

ExecutionResult captures the result of a full pipeline execution.

type Executor

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

Executor runs lore pipeline phases.

func NewExecutor

func NewExecutor(cfg ExecutorConfig) *Executor

NewExecutor creates a new pipeline executor.

func (*Executor) Execute

func (e *Executor) Execute(ctx context.Context, lifecycle *registry.Lifecycle, packageDir string, op Operation) (*ExecutionResult, error)

Execute runs the pipeline for a package lifecycle. Deprecated: Use ExecutePackage with a LorePackage for proper directory resolution.

func (*Executor) ExecutePackage

func (e *Executor) ExecutePackage(ctx context.Context, pkg *registry.LorePackage, op Operation) (*ExecutionResult, error)

ExecutePackage runs the pipeline for a LorePackage.

type ExecutorConfig

type ExecutorConfig struct {
	// Features to enable for this execution.
	Features []string

	// Settings to pass to phase scripts.
	Settings map[string]string

	// DryRun shows what would happen without executing.
	DryRun bool

	// Verbose enables detailed output.
	Verbose bool

	// Output is where execution output is written.
	Output io.Writer

	// SinglePhase runs only this phase (empty = all phases).
	SinglePhase string

	// Platform override (empty = auto-detect).
	Platform string
}

ExecutorConfig configures the pipeline executor.

type Operation

type Operation int

Operation represents the type of pipeline operation.

const (
	// OpDeploy runs the standard deploy pipeline: prepare → install → provision → verify
	OpDeploy Operation = iota
	// OpUpgrade runs the upgrade pipeline (same as deploy with version context)
	OpUpgrade
	// OpDecommission runs the reverse pipeline: unprovision → uninstall → cleanup
	OpDecommission
)

func (Operation) String

func (o Operation) String() string

String returns the operation name.

type PhaseResult

type PhaseResult struct {
	Name      string
	Started   time.Time
	Completed time.Time
	Duration  time.Duration
	Success   bool
	Error     error
	Skipped   bool
	Scripts   []string // Scripts that were executed for this phase
}

PhaseResult captures the result of executing a single phase.

Jump to

Keyboard shortcuts

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