Documentation
¶
Index ¶
- Constants
- type ApproveStepRequest
- type ApproveStepResponse
- type CancelStepRequest
- type CancelStepResponse
- type RetryStepRequest
- type RetryStepResponse
- type Signal
- func (s *Signal) Cancel(ctx workflow.Context) error
- func (s *Signal) Execute(ctx workflow.Context) error
- func (s *Signal) RegisterUpdateHandlers(ctx workflow.Context) error
- func (s *Signal) SleepAfter() time.Duration
- func (s *Signal) Type() signal.SignalType
- func (s *Signal) Validate(ctx workflow.Context) error
- type SkipStepRequest
- type SkipStepResponse
- type StepResult
Constants ¶
const ( DirectiveContinue = "continue" DirectiveStop = "stop" DirectiveRetry = "retry" DirectiveRetryGroup = "retry-group" DirectiveSkipGroup = "skip-group" DirectiveAwaitApproval = "await-approval" )
Directive constants — duplicated to avoid import cycle with the flow package.
const SignalType signal.SignalType = "execute-workflow-step-group"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApproveStepRequest ¶
type ApproveStepRequest struct {
StepID string `json:"step_id"`
ApprovalResponseID string `json:"approval_response_id"`
ResponseType string `json:"response_type"`
}
ApproveStepRequest is the input for the "approve-step" group update handler.
type ApproveStepResponse ¶
type ApproveStepResponse struct{}
ApproveStepResponse is the response from the "approve-step" group update handler.
type CancelStepRequest ¶
type CancelStepRequest struct {
StepID string `json:"step_id"`
}
CancelStepRequest is the input for the "cancel-step" group update handler.
type CancelStepResponse ¶
type CancelStepResponse struct{}
CancelStepResponse is the response from the "cancel-step" group update handler.
type RetryStepRequest ¶
type RetryStepRequest struct {
StepID string `json:"step_id"`
}
RetryStepRequest is the input for the "retry-step" group update handler.
type RetryStepResponse ¶
type RetryStepResponse struct {
Retryable bool `json:"retryable"`
Directive string `json:"directive"`
}
RetryStepResponse is the response from the "retry-step" group update handler.
type Signal ¶
type Signal struct {
WorkflowID string `json:"workflow_id"`
StepGroupID string `json:"step_group_id"`
GroupIdx int `json:"group_idx"`
OwnerID string `json:"owner_id"`
OwnerType string `json:"owner_type"`
QueueName string `json:"queue_name"`
TargetQueueName string `json:"target_queue_name"`
Parallel bool `json:"parallel"`
// contains filtered or unexported fields
}
Signal encapsulates the lifecycle of executing all steps within a single workflow step group (GroupIdx). It orchestrates sequential or parallel step dispatch and communicates the group outcome back to the flow signal via the workflow's ResultDirective field.
func (*Signal) RegisterUpdateHandlers ¶
RegisterUpdateHandlers registers group-level update handlers.
func (*Signal) SleepAfter ¶
func (*Signal) Type ¶
func (s *Signal) Type() signal.SignalType
type SkipStepRequest ¶
type SkipStepRequest struct {
StepID string `json:"step_id"`
}
SkipStepRequest is the input for the "skip-step" group update handler.
type SkipStepResponse ¶
type SkipStepResponse struct {
Skippable bool `json:"skippable"`
}
SkipStepResponse is the response from the "skip-step" group update handler.
type StepResult ¶
type StepResult struct {
// Directive is the step's ResultDirective after execution. Empty or
// "continue" means the caller should proceed to the next step.
Directive string
// Error is set when the step failed and was NOT handled by auto-retry or
// user action. The caller should propagate this as a group error.
Error error
}
StepResult describes the outcome of executing a single step.