workflowctl

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package workflowctl provides a minimal, SDK-agnostic interface for controlling and inspecting workflow executions. It is designed to be implemented by runtimes without leaking SDK types into recipe-core or ops packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobInspection added in v0.0.24

type JobInspection struct {
	JobKey         jobdb.JobKey
	Terminal       bool
	Status         string
	FailureKind    string
	FailureMessage string
	Output         jobdb.JobData
	StartedAt      time.Time
	FinishedAt     time.Time
}

type JobInspector added in v0.0.24

type JobInspector interface {
	InspectJob(ctx context.Context, key jobdb.JobKey) (JobInspection, error)
}

type JobItem

type JobItem struct {
	TaskData jobdb.TaskData
	jobdb.JobSummary
}

type StartJob

type StartJob struct {
	TenantId     string                 `json:"tenantId"`
	JobID        string                 `json:"job_id,omitempty"`
	RecipeName   string                 `json:"recipe"`
	Inputs       map[string]interface{} `json:"inputs,omitempty"`
	Artifacts    []jobdb.Artifact       `json:"-"`
	ArtifactRefs []recipeartifacts.Ref  `json:"artifact_refs,omitempty"`
	JobContext   contextual.JobContext  `json:"context,omitempty"`
	Parent       *jobcontext.Parent     `json:"parent,omitempty"`
	GitRef       string                 `json:"git,omitempty"`
	SubmittedAt  *time.Time             `json:"submitted_at,omitempty"`
	InputHash    string                 `json:"input_hash,omitempty"`
}

type TaskHandle

type TaskHandle = jobworkflow.TaskHandle

type WorkflowControl

type WorkflowControl interface {
	StartJob(ctx context.Context, req StartJob) (jobdb.JobKey, error)
	Cancel(ctx context.Context, jobKey jobdb.JobKey) error
	ListJobs(ctx context.Context, request jobdb.ListJobsRequest) (jobs []JobItem, nextPage string, err error)
	CompleteTask(ctx context.Context, jobKey jobdb.JobKey, taskOrdinal int64, hash string, data any) error
	GetWaitingTask(ctx context.Context, jobKey jobdb.JobKey) (TaskHandle, error)
	GetArtifactLazy(ctx context.Context, tenantId string, key jobdb.ArtifactKey) jobdb.Artifact
	JobResult(ctx context.Context, key jobdb.JobKey) (jobdb.JobData, error)
}

Jump to

Keyboard shortcuts

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