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 JobInspector ¶ added in v0.0.24
type StartJob ¶
type StartJob struct {
ToolSetupVersion int `json:"tool_setup_version,omitempty"`
Execution *execution.Demand `json:"execution,omitempty"`
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)
}
Click to show internal directories.
Click to hide internal directories.