Documentation
¶
Overview ¶
Package export provides exporters for converting PIDL protocols to workflow engine formats.
Index ¶
- type BPMNExporter
- type Branch
- type Catch
- type Choice
- type PrefectExporter
- type PrefectFlow
- type PrefectParallelBlock
- type PrefectTask
- type Retry
- type State
- type StateMachine
- type StepFunctionsExporter
- type TemporalActivity
- type TemporalExporter
- type TemporalParallelBlock
- type TemporalStep
- type TemporalWorkflow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BPMNExporter ¶
type BPMNExporter struct {
// TargetNamespace for the BPMN definition.
TargetNamespace string
}
BPMNExporter exports PIDL process specs to BPMN 2.0 XML format.
func NewBPMNExporter ¶
func NewBPMNExporter() *BPMNExporter
NewBPMNExporter creates a new BPMN exporter with defaults.
type Catch ¶
type Catch struct {
ErrorEquals []string `json:"ErrorEquals"`
Next string `json:"Next"`
ResultPath string `json:"ResultPath,omitempty"`
}
Catch defines error handling for a state.
type Choice ¶
type Choice struct {
Variable string `json:"Variable,omitempty"`
StringEquals string `json:"StringEquals,omitempty"`
NumericEquals int `json:"NumericEquals,omitempty"`
BooleanEquals *bool `json:"BooleanEquals,omitempty"`
Next string `json:"Next"`
}
Choice defines a choice rule for Choice states.
type PrefectExporter ¶
type PrefectExporter struct {
// FlowName overrides the generated flow name.
FlowName string
// IncludeTasks generates task stubs.
IncludeTasks bool
// UseAsync generates async flow/tasks.
UseAsync bool
}
PrefectExporter exports PIDL process specs to Prefect workflow Python code.
func NewPrefectExporter ¶
func NewPrefectExporter() *PrefectExporter
NewPrefectExporter creates a new Prefect exporter with defaults.
type PrefectFlow ¶
type PrefectFlow struct {
FlowName string
FlowID string
Description string
Tasks []PrefectTask
ParallelBlocks []PrefectParallelBlock
UseAsync bool
}
PrefectFlow represents a generated Prefect flow.
type PrefectParallelBlock ¶
PrefectParallelBlock represents a parallel execution block.
type PrefectTask ¶
type PrefectTask struct {
Name string
FuncName string
Description string
Retries int
RetryDelay string
Timeout string
Tags []string
StepType string
}
PrefectTask represents a Prefect task.
type Retry ¶
type Retry struct {
ErrorEquals []string `json:"ErrorEquals"`
IntervalSeconds int `json:"IntervalSeconds,omitempty"`
MaxAttempts int `json:"MaxAttempts,omitempty"`
BackoffRate float64 `json:"BackoffRate,omitempty"`
}
Retry defines retry behavior for a state.
type State ¶
type State struct {
Type string `json:"Type"`
Comment string `json:"Comment,omitempty"`
Resource string `json:"Resource,omitempty"`
Next string `json:"Next,omitempty"`
End bool `json:"End,omitempty"`
Retry []Retry `json:"Retry,omitempty"`
Catch []Catch `json:"Catch,omitempty"`
ResultPath string `json:"ResultPath,omitempty"`
// Task-specific fields
TimeoutSeconds int `json:"TimeoutSeconds,omitempty"`
HeartbeatSeconds int `json:"HeartbeatSeconds,omitempty"`
// Choice state fields
Choices []Choice `json:"Choices,omitempty"`
Default string `json:"Default,omitempty"`
// Parallel state fields
Branches []Branch `json:"Branches,omitempty"`
// Wait state fields
Seconds int `json:"Seconds,omitempty"`
SecondsPath string `json:"SecondsPath,omitempty"`
// Pass state fields
Result interface{} `json:"Result,omitempty"`
// Map state fields
ItemsPath string `json:"ItemsPath,omitempty"`
MaxConcurrency int `json:"MaxConcurrency,omitempty"`
Iterator *StateMachine `json:"Iterator,omitempty"`
}
State represents a state in the state machine.
type StateMachine ¶
type StateMachine struct {
Comment string `json:"Comment,omitempty"`
StartAt string `json:"StartAt"`
States map[string]State `json:"States"`
TimeoutSeconds int `json:"TimeoutSeconds,omitempty"`
}
StateMachine represents an AWS Step Functions state machine definition.
type StepFunctionsExporter ¶
type StepFunctionsExporter struct {
// StateMachineName overrides the generated state machine name.
StateMachineName string
// Comment adds a comment to the state machine definition.
Comment string
// TimeoutSeconds sets the default timeout for the state machine.
TimeoutSeconds int
}
StepFunctionsExporter exports PIDL process specs to AWS Step Functions (Amazon States Language).
func NewStepFunctionsExporter ¶
func NewStepFunctionsExporter() *StepFunctionsExporter
NewStepFunctionsExporter creates a new Step Functions exporter with defaults.
type TemporalActivity ¶
type TemporalActivity struct {
Name string
Description string
InputType string
OutputType string
Timeout string
Retries int
StepType string
}
TemporalActivity represents a workflow activity.
type TemporalExporter ¶
type TemporalExporter struct {
// PackageName is the Go package name for generated code.
PackageName string
// WorkflowName overrides the generated workflow name.
WorkflowName string
// IncludeActivities generates activity stubs.
IncludeActivities bool
}
TemporalExporter exports PIDL process specs to Temporal workflow code.
func NewTemporalExporter ¶
func NewTemporalExporter() *TemporalExporter
NewTemporalExporter creates a new Temporal exporter with defaults.
type TemporalParallelBlock ¶
TemporalParallelBlock represents a parallel execution block.
type TemporalStep ¶
type TemporalStep struct {
Name string
ActivityName string
Description string
IsParallelStart bool
IsParallelEnd bool
Condition string
}
TemporalStep represents a step in the workflow.
type TemporalWorkflow ¶
type TemporalWorkflow struct {
PackageName string
WorkflowName string
WorkflowID string
Description string
Activities []TemporalActivity
Steps []TemporalStep
ParallelBlocks []TemporalParallelBlock
}
TemporalWorkflow represents a generated Temporal workflow.