Documentation
¶
Overview ¶
Package durableworkflow is the Go SDK for Durable Workflow.
This module is a pre-release design prototype written against the published Durable Workflow protocol. Its API is not stable, it has no release, and it must not be used in production.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityError ¶ added in v0.2.0
type ActivityError struct {
ActivityType string
ActivityExecutionID string
AttemptID string
FailureID string
// TimeoutKind is the recorded deadline kind for a terminal timeout.
TimeoutKind string
Cause *ApplicationError
}
ActivityError is a terminal failure returned by a recorded workflow activity. Cause carries the application failure from Server history. A terminal timeout sets TimeoutKind and leaves Cause nil.
func (*ActivityError) Error ¶ added in v0.2.0
func (*ActivityError) Error() string
func (*ActivityError) Unwrap ¶ added in v0.2.0
func (err *ActivityError) Unwrap() error
Unwrap exposes the recorded application failure to errors.As.
type ActivityRef ¶
ActivityRef is a typed reference to an activity.
func Activity ¶
func Activity[In, Out any](name string) ActivityRef[In, Out]
Activity names an activity with one input struct and one result.
type ApplicationError ¶
type ApplicationError struct {
Type string
Message string
NonRetryable bool
Details any
Cause error
}
ApplicationError is a failure with a portable type and retry decision. Details use the SDK payload mapping. Cause is available through Go's errors.Is and errors.As within the process.
func (*ApplicationError) Error ¶
func (err *ApplicationError) Error() string
func (*ApplicationError) Unwrap ¶
func (err *ApplicationError) Unwrap() error
Unwrap returns the local cause of the application error.
type Ref ¶
type Ref[In, Out any] struct { // contains filtered or unexported fields }
Ref identifies an operation with input type In and result type Out. The wire name is part of the durable contract and must remain stable when a Go function moves or is renamed.
type WorkflowRef ¶
WorkflowRef is a typed reference to a workflow.
func Workflow ¶
func Workflow[In, Out any](name string) WorkflowRef[In, Out]
Workflow names a workflow with one input struct and one result.
Example ¶
issueInvoice := durableworkflow.Workflow[invoiceInput, invoiceResult]("billing.issue-invoice")
fmt.Println(issueInvoice.Name())
Output: billing.issue-invoice
Directories
¶
| Path | Synopsis |
|---|---|
|
Package avro implements the Durable Workflow Avro Value codec.
|
Package avro implements the Durable Workflow Avro Value codec. |
|
Package client provides the control-plane client for Durable Workflow.
|
Package client provides the control-plane client for Durable Workflow. |
|
examples
|
|
|
firstworkflow
command
|
|
|
integrations
|
|
|
laravel
module
|
|
|
internal
|
|
|
names
Package names validates names shared by the control plane and worker.
|
Package names validates names shared by the control plane and worker. |
|
transport
Package transport sends versioned Durable Workflow HTTP requests.
|
Package transport sends versioned Durable Workflow HTTP requests. |
|
workflowcontext
Package workflowcontext holds the context state supplied by the workflow engine.
|
Package workflowcontext holds the context state supplied by the workflow engine. |
|
Package metrics defines the shared Durable Workflow SDK instruments.
|
Package metrics defines the shared Durable Workflow SDK instruments. |
|
otel
module
|
|
|
scripts
|
|
|
conformance/worker_lifecycle/sigterm
command
Command sigterm exercises an activity worker draining on SIGTERM against a disposable Native server.
|
Command sigterm exercises an activity worker draining on SIGTERM against a disposable Native server. |
|
Package worker registers handlers for Durable Workflow tasks.
|
Package worker registers handlers for Durable Workflow tasks. |
|
internal/failure
Package failure prepares worker failure reports.
|
Package failure prepares worker failure reports. |
|
Package workflow provides replay-safe types for workflow and handler code.
|
Package workflow provides replay-safe types for workflow and handler code. |
|
workflowtest
module
|