workflowctl

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: AGPL-3.0 Imports: 5 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 JobItem

type JobItem struct {
	TaskData swf.TaskData
	swf.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    []swf.Artifact         `json:"artifacts,omitempty"`
	ArtifactRefs []recipeartifacts.Ref  `json:"artifact_refs,omitempty"`
	JobContext   contextual.JobContext  `json:"context,omitempty"`
	GitRef       string                 `json:"git,omitempty"`
	SubmittedAt  *time.Time             `json:"submitted_at,omitempty"`
	InputHash    string                 `json:"input_hash,omitempty"`
}

type TaskHandle

type TaskHandle = swf.TaskHandle

type WorkflowControl

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

Jump to

Keyboard shortcuts

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