Documentation
¶
Index ¶
- Constants
- func RestartRecipeJob(ctx context.Context, engine recipeJobRestartSubmitter, prior swf.JobKey, ...) (swf.JobKey, error)
- func StartRecipeJob(ctx context.Context, startJob workflowctl.StartJob, engine recipeJobSubmitter, ...) (swf.JobKey, error)
- func StartRecipeJobWithOptions(ctx context.Context, startJob workflowctl.StartJob, engine recipeJobSubmitter, ...) (swf.JobKey, error)
- type JobMetadata
- type StartRecipeJobOptions
Constants ¶
View Source
const ( RecipeJobType = "recipe" RecipeArtifactSuffix = ".recipe.yaml" )
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 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
}
Click to show internal directories.
Click to hide internal directories.