Documentation
¶
Index ¶
- type DefaultScheduler
- type EventSink
- type ExecutionError
- type Executor
- type ExecutorOption
- type GroupResult
- type GroupResultOptions
- type JobEvent
- type JobResult
- func (r JobResult) Duration() time.Duration
- func (r JobResult) Err() error
- func (r JobResult) Failed() bool
- func (r JobResult) FinishedAt() time.Time
- func (r JobResult) Name() string
- func (r JobResult) ProducedArtifact() (pipeline.Artifact, bool)
- func (r JobResult) ProducedArtifacts() []pipeline.Artifact
- func (r JobResult) StartedAt() time.Time
- func (r JobResult) Status() JobStatus
- type JobResultOptions
- type JobRunner
- type JobStatus
- type Result
- type ResultOptions
- type Scheduler
- type Stats
- type WorkerPool
- type Workspace
- func (w Workspace) ModuleDir(rel string) string
- func (w Workspace) PlanFile(rel string) string
- func (w Workspace) PlanJSONFile(rel string) string
- func (w Workspace) PlanTextFile(rel string) string
- func (w Workspace) ServiceDir() string
- func (w Workspace) ServiceFile(name string) string
- func (w Workspace) WorkDir() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultScheduler ¶
type DefaultScheduler struct{}
DefaultScheduler schedules jobs from the pipeline DAG.
type EventSink ¶
type EventSink interface {
JobStarted(event JobEvent)
JobFinished(event JobEvent, result JobResult)
}
EventSink consumes structured execution events.
type ExecutionError ¶ added in v0.10.7
ExecutionError wraps a failed job execution while preserving the original cause for errors.Is/errors.As.
func (*ExecutionError) Error ¶ added in v0.10.7
func (e *ExecutionError) Error() string
func (*ExecutionError) Unwrap ¶ added in v0.10.7
func (e *ExecutionError) Unwrap() error
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor executes a Plan.
func NewExecutor ¶
func NewExecutor(runner JobRunner, opts ...ExecutorOption) *Executor
NewExecutor constructs an Executor.
type ExecutorOption ¶
type ExecutorOption func(*Executor)
ExecutorOption mutates executor behavior.
func WithEventSink ¶
func WithEventSink(sink EventSink) ExecutorOption
WithEventSink configures an execution event sink.
func WithParallelism ¶
func WithParallelism(parallelism int) ExecutorOption
WithParallelism bounds concurrent jobs inside one execution group.
func WithScheduler ¶
func WithScheduler(s Scheduler) ExecutorOption
WithScheduler overrides the execution scheduler.
type GroupResult ¶
type GroupResult struct {
// contains filtered or unexported fields
}
GroupResult describes one scheduled execution group.
func NewGroupResult ¶ added in v0.10.7
func NewGroupResult(opts GroupResultOptions) (GroupResult, error)
NewGroupResult validates and constructs a group result.
func (GroupResult) JobCount ¶
func (r GroupResult) JobCount() int
func (GroupResult) Name ¶
func (r GroupResult) Name() string
type GroupResultOptions ¶ added in v0.10.7
GroupResultOptions describes one scheduled execution group result.
type JobEvent ¶ added in v0.10.7
type JobEvent struct {
// contains filtered or unexported fields
}
JobEvent is immutable context for an execution event.
func NewJobEvent ¶ added in v0.10.7
NewJobEvent constructs event context from an immutable pipeline job value.
func (JobEvent) Operation ¶ added in v0.10.7
func (e JobEvent) Operation() pipeline.OperationType
Operation returns the operation type being executed.
type JobResult ¶
type JobResult struct {
// contains filtered or unexported fields
}
JobResult is the immutable execution outcome for one job.
func NewJobResult ¶ added in v0.10.7
func NewJobResult(opts JobResultOptions) (JobResult, error)
NewJobResult validates and constructs a job result.
func (JobResult) FinishedAt ¶
func (JobResult) ProducedArtifact ¶ added in v0.10.7
func (JobResult) ProducedArtifacts ¶ added in v0.10.7
type JobResultOptions ¶ added in v0.10.7
type JobResultOptions struct {
Name string
Status JobStatus
StartedAt time.Time
FinishedAt time.Time
ProducedArtifacts []pipeline.Artifact
Err error
}
JobResultOptions describes one job execution result.
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Result is the immutable aggregate outcome for a run.
func NewResult ¶ added in v0.10.7
func NewResult(opts ResultOptions) (*Result, error)
NewResult constructs an immutable aggregate execution result.
func (*Result) Groups ¶
func (r *Result) Groups() []GroupResult
Groups returns defensive group result copies.
type ResultOptions ¶ added in v0.10.7
type ResultOptions struct {
Groups []GroupResult
Jobs []JobResult
}
ResultOptions describes an aggregate execution result.
type Scheduler ¶
Scheduler builds execution groups from a pipeline IR.
Returns an error if the IR is structurally invalid (cycles or duplicate job names) — preventing silent fallback that would run dependent jobs in the wrong order.
type Stats ¶ added in v0.10.7
type Stats struct {
// contains filtered or unexported fields
}
Stats is an immutable aggregate execution summary.
type WorkerPool ¶
type WorkerPool interface {
Run(ctx context.Context, jobs []pipeline.Job, fn func(context.Context, pipeline.Job) error) error
}
WorkerPool runs a group of jobs with bounded concurrency.
type Workspace ¶
type Workspace struct {
// contains filtered or unexported fields
}
Workspace centralizes canonical execution-domain paths.
func NewWorkspace ¶
NewWorkspace constructs a Workspace from absolute work and service directories.
func (Workspace) ModuleDir ¶
ModuleDir returns the absolute module directory for a relative module path.
func (Workspace) PlanJSONFile ¶
PlanJSONFile returns the absolute plan.json path for a module.
func (Workspace) PlanTextFile ¶
PlanTextFile returns the absolute plan.txt path for a module.
func (Workspace) ServiceDir ¶
func (Workspace) ServiceFile ¶
ServiceFile returns the absolute path to a file under the service directory.