starter

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RecipeJobType        = "recipe"
	RecipeArtifactSuffix = ".recipe.yaml"
)
View Source
const (
	JobMetadataVersion = 1

	MetaFieldVersion  swf.FieldName = "v"
	MetaFieldRecipe   swf.FieldName = "recipe"
	MetaFieldCellID   swf.FieldName = "cell_id"
	MetaFieldCellName swf.FieldName = "cell_name"
	MetaFieldGitRef   swf.FieldName = "git_ref"
)

Variables

This section is empty.

Functions

func RestartRecipeJob

func RestartRecipeJob(ctx context.Context, engine recipeJobRestartSubmitter, prior swf.JobKey, stepOffset int64, patch *task.ContextPatch) (swf.JobKey, error)

RestartRecipeJob restarts an existing recipe job from the provided step offset.

stepOffset is the next chapter ordinal to execute (0-based). Internally SWF uses LastStepToKeep, so we keep chapters up to stepOffset-1.

If patch is non-nil, we inject a context patch envelope as the next chapter output to be replayed. This intentionally causes a swf.TaskInputMismatchError at replay time, allowing the recipe worker to detect and apply the patch before re-executing the task.

func StartRecipeJob

func StartRecipeJob(ctx context.Context, startJob workflowctl.StartJob, engine recipeJobSubmitter, recipes ...recipe.Recipe) (swf.JobKey, error)

func StartRecipeJobWithOptions

func StartRecipeJobWithOptions(ctx context.Context, startJob workflowctl.StartJob, engine recipeJobSubmitter, opts StartRecipeJobOptions, recipes ...recipe.Recipe) (swf.JobKey, error)

Types

type JobMetadata

type JobMetadata struct {
	Version    int    `json:"v"`
	RecipeName string `json:"recipe,omitempty"`
	CellID     string `json:"cell_id,omitempty"`
	CellName   string `json:"cell_name,omitempty"`
	GitRef     string `json:"git_ref,omitempty"`
}

func JobMetadataFromStartJob

func JobMetadataFromStartJob(startJob workflowctl.StartJob) JobMetadata

type StartRecipeJobOptions

type StartRecipeJobOptions struct {
	JobID         string
	Prerequisites []swf.JobPrerequisite
}

Jump to

Keyboard shortcuts

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