Documentation
¶
Index ¶
- type ApprovePlanRequest
- type CancelGroupRequest
- type CancelGroupResponse
- type CancelStepRequest
- type CancelStepResponse
- type CancelWorkflowRequest
- type CancelWorkflowResponse
- type Client
- func (c *Client) ApprovePlan(ctx context.Context, req *ApprovePlanRequest) error
- func (c *Client) CancelGroup(ctx context.Context, req *CancelGroupRequest) (*CancelGroupResponse, error)
- func (c *Client) CancelStep(ctx context.Context, req *CancelStepRequest) (*CancelStepResponse, error)
- func (c *Client) CancelWorkflow(ctx context.Context, req *CancelWorkflowRequest) (*CancelWorkflowResponse, error)
- func (c *Client) IsRetryable(ctx context.Context, req *IsRetryableRequest) (*IsRetryableResponse, error)
- func (c *Client) PauseWorkflow(ctx context.Context, req *PauseWorkflowRequest) error
- func (c *Client) PollNextStep(ctx context.Context, req *PollNextStepRequest) (*PollNextStepResponse, error)
- func (c *Client) RetryGroup(ctx context.Context, req *RetryGroupRequest) (*RetryGroupResponse, error)
- func (c *Client) RetryStep(ctx context.Context, req *RetryStepRequest) (*RetryStepResponse, error)
- func (c *Client) SkipStep(ctx context.Context, req *SkipStepRequest) (*SkipStepResponse, error)
- func (c *Client) UnpauseWorkflow(ctx context.Context, req *UnpauseWorkflowRequest) error
- type IsRetryableRequest
- type IsRetryableResponse
- type Params
- type PauseWorkflowRequest
- type PollNextStepRequest
- type PollNextStepResponse
- type RetryGroupRequest
- type RetryGroupResponse
- type RetryStepRequest
- type RetryStepResponse
- type SkipStepRequest
- type SkipStepResponse
- type UnpauseWorkflowRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovePlanRequest ¶
type ApprovePlanRequest struct {
InstallWorkflowID string
StepID string
ApprovalResponseID string
ResponseType app.WorkflowStepResponseType
}
ApprovePlanRequest is the input for approving a plan on a workflow step.
type CancelGroupRequest ¶
type CancelGroupRequest struct {
InstallWorkflowID string
// StepID is any step in the group to cancel.
StepID string
}
CancelGroupRequest is the input for cancelling all steps in a group.
type CancelGroupResponse ¶
type CancelGroupResponse struct {
WorkflowID string `json:"workflow_id"`
}
CancelGroupResponse is the response from the cancel-group update.
type CancelStepRequest ¶
CancelStepRequest is the input for cancelling a workflow step.
type CancelStepResponse ¶
type CancelStepResponse struct {
WorkflowID string `json:"workflow_id"`
}
CancelStepResponse is the response from the cancel-step update.
type CancelWorkflowRequest ¶
type CancelWorkflowRequest struct {
InstallWorkflowID string
}
CancelWorkflowRequest is the input for cancelling an entire workflow.
type CancelWorkflowResponse ¶
type CancelWorkflowResponse struct {
WorkflowID string `json:"workflow_id"`
}
CancelWorkflowResponse is the response from the cancel-workflow update.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides methods for interacting with running flow workflows via Temporal update handlers. It is a direct Go client (not a Temporal activity) called from API handlers.
func (*Client) ApprovePlan ¶
func (c *Client) ApprovePlan(ctx context.Context, req *ApprovePlanRequest) error
ApprovePlan sends an "approve-step" update to the execute-flow handler workflow for the given install workflow. The execute-flow handler forwards the approval to the step's handler workflow.
func (*Client) CancelGroup ¶
func (c *Client) CancelGroup(ctx context.Context, req *CancelGroupRequest) (*CancelGroupResponse, error)
CancelGroup sends a "cancel-group" update to the execute-flow handler workflow. This cancels all in-flight steps in the group containing the given step.
func (*Client) CancelStep ¶
func (c *Client) CancelStep(ctx context.Context, req *CancelStepRequest) (*CancelStepResponse, error)
CancelStep sends a "cancel-step" update to the execute-flow handler workflow for the given install workflow. The handler workflow forwards the cancellation to the step's handler workflow.
func (*Client) CancelWorkflow ¶
func (c *Client) CancelWorkflow(ctx context.Context, req *CancelWorkflowRequest) (*CancelWorkflowResponse, error)
CancelWorkflow sends a "cancel-workflow" update to the execute-flow handler workflow, cancelling the entire workflow after the current group completes.
func (*Client) IsRetryable ¶
func (c *Client) IsRetryable(ctx context.Context, req *IsRetryableRequest) (*IsRetryableResponse, error)
IsRetryable sends an "is-retryable" update to the execute-workflow-step handler workflow to check if the step can be retried.
func (*Client) PauseWorkflow ¶
func (c *Client) PauseWorkflow(ctx context.Context, req *PauseWorkflowRequest) error
PauseWorkflow sends a "pause-workflow" update to the execute-flow handler workflow. The workflow will pause after the current group completes.
func (*Client) PollNextStep ¶
func (c *Client) PollNextStep(ctx context.Context, req *PollNextStepRequest) (*PollNextStepResponse, error)
PollNextStep sends a "poll-next-step" update to the execute-flow handler workflow. It returns the first non-terminal step, or an empty response when the workflow is complete.
func (*Client) RetryGroup ¶
func (c *Client) RetryGroup(ctx context.Context, req *RetryGroupRequest) (*RetryGroupResponse, error)
RetryGroup sends a "retry-group" update to the execute-flow handler workflow. This retries all steps in the group that contains the given step.
func (*Client) RetryStep ¶
func (c *Client) RetryStep(ctx context.Context, req *RetryStepRequest) (*RetryStepResponse, error)
RetryStep sends a "retry-step" update to the execute-flow handler workflow for the given install workflow. Uses update-with-start so the handler is restarted if it has already terminated.
func (*Client) SkipStep ¶
func (c *Client) SkipStep(ctx context.Context, req *SkipStepRequest) (*SkipStepResponse, error)
SkipStep sends a "skip-step" update to the execute-flow handler workflow for the given install workflow.
func (*Client) UnpauseWorkflow ¶
func (c *Client) UnpauseWorkflow(ctx context.Context, req *UnpauseWorkflowRequest) error
UnpauseWorkflow sends an "unpause-workflow" update to the execute-flow handler workflow. The workflow will resume from the next group.
type IsRetryableRequest ¶
type IsRetryableRequest struct {
StepID string
}
IsRetryableRequest is the input for checking step retryability.
type IsRetryableResponse ¶
type IsRetryableResponse struct {
Retryable bool `json:"retryable"`
Skippable bool `json:"skippable"`
StepID string `json:"step_id"`
}
IsRetryableResponse is the response indicating step retryability.
type PauseWorkflowRequest ¶
type PauseWorkflowRequest struct {
InstallWorkflowID string
}
PauseWorkflowRequest is the input for pausing a workflow.
type PollNextStepRequest ¶
type PollNextStepRequest struct {
InstallWorkflowID string
}
PollNextStepRequest identifies the workflow to poll.
type PollNextStepResponse ¶
type PollNextStepResponse struct {
StepID string `json:"step_id"`
StepIdx int `json:"step_idx"`
Status string `json:"status"`
}
PollNextStepResponse contains the current in-flight step, or empty fields when all steps are terminal (workflow complete).
type RetryGroupRequest ¶
type RetryGroupRequest struct {
InstallWorkflowID string
// StepID is any step in the group to retry. The handler resolves the
// group from this step's GroupIdx.
StepID string
}
RetryGroupRequest is the input for retrying an entire workflow step group.
type RetryGroupResponse ¶
type RetryGroupResponse struct {
WorkflowID string `json:"workflow_id"`
Retryable bool `json:"retryable"`
}
RetryGroupResponse is the response from the retry-group update.
type RetryStepRequest ¶
RetryStepRequest is the input for retrying a workflow step.
type RetryStepResponse ¶
type RetryStepResponse struct {
WorkflowID string `json:"workflow_id"`
Retryable bool `json:"retryable"`
}
RetryStepResponse is the response from the retry-step update.
type SkipStepRequest ¶
SkipStepRequest is the input for skipping a workflow step.
type SkipStepResponse ¶
type SkipStepResponse struct {
WorkflowID string `json:"workflow_id"`
Skippable bool `json:"skippable"`
}
SkipStepResponse is the response from the skip-step update.
type UnpauseWorkflowRequest ¶
type UnpauseWorkflowRequest struct {
InstallWorkflowID string
}
UnpauseWorkflowRequest is the input for unpausing a workflow.