temporal

package module
v0.0.0-...-97babc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStartWorkflow = errors.New("failed to start workflow").
						WithCode("ERR_START_WORKFLOW").
						WithKind(errors.KindInternal).
						Retryable()

	ErrDescribeWorkflow = errors.New("failed to describe workflow").
						WithCode("ERR_DESCRIBE_WORKFLOW").
						WithKind(errors.KindInternal).
						Retryable()

	ErrMissingWorkflowExecutionInfo = errors.New("missing workflow execution info").
									WithCode("ERR_MISSING_WORKFLOW_EXECUTION_INFO").
									WithKind(errors.KindCritical)
)

Functions

func ActivityContext

func ActivityContext(ctx workflow.Context, queue string, opts ...ActivityContextOption) workflow.Context

func ChildWorkflowContext

func ChildWorkflowContext(ctx workflow.Context, wID string, opts ...ChildWorkflowContextOption) workflow.Context

func FailureCause

func FailureCause(err error) error

func FailureReason

func FailureReason(err error) string

FailureReason tries to extract a concise, human-friendly reason from Temporal error wrappers. It prioritizes unwrapped domain errors, then ApplicationError messages, and finally falls back to the original error.

func StartWorkflowOptions

func StartWorkflowOptions(wID, queue string, opts ...StartWorkflowContextOption) client.StartWorkflowOptions

Types

type ActivityContextOption

type ActivityContextOption func(*activityContextOptions)

func WithActivityHeartbeatTimeout

func WithActivityHeartbeatTimeout(timeout time.Duration) ActivityContextOption

func WithActivityInitialInterval

func WithActivityInitialInterval(interval time.Duration) ActivityContextOption

func WithActivityMaximumInterval

func WithActivityMaximumInterval(interval time.Duration) ActivityContextOption

func WithActivityNonRetryableErrorTypes

func WithActivityNonRetryableErrorTypes(types []string) ActivityContextOption

func WithActivityScheduleToCloseTimeout

func WithActivityScheduleToCloseTimeout(timeout time.Duration) ActivityContextOption

func WithActivityStartToCloseTimeout

func WithActivityStartToCloseTimeout(timeout time.Duration) ActivityContextOption

func WithPolling

func WithPolling() ActivityContextOption

type ChildWorkflowContextOption

type ChildWorkflowContextOption func(*childWorkflowContextOptions)

func WithChildWorkflowParentClosePolicy

func WithChildWorkflowParentClosePolicy(policy enums.ParentClosePolicy) ChildWorkflowContextOption

func WithChildWorkflowSearchAttributeAccountID

func WithChildWorkflowSearchAttributeAccountID(accountID uuid.UUID) ChildWorkflowContextOption

func WithChildWorkflowSearchAttributeOrganization

func WithChildWorkflowSearchAttributeOrganization(org string) ChildWorkflowContextOption

func WithChildWorkflowSearchAttributeUserID

func WithChildWorkflowSearchAttributeUserID(userID string) ChildWorkflowContextOption

func WithChildWorkflowTaskQueue

func WithChildWorkflowTaskQueue(queue string) ChildWorkflowContextOption

func WithChildWorkflowWorkflowExecutionTimeout

func WithChildWorkflowWorkflowExecutionTimeout(timeout time.Duration) ChildWorkflowContextOption

func WithChildWorkflowWorkflowIDReusePolicy

func WithChildWorkflowWorkflowIDReusePolicy(policy enums.WorkflowIdReusePolicy) ChildWorkflowContextOption

type Client

type Client interface {
	client.Client
}

type StartWorkflowContextOption

type StartWorkflowContextOption func(*startWorkflowContextOptions)

func WithSearchAttributeAccountID

func WithSearchAttributeAccountID(accountID uuid.UUID) StartWorkflowContextOption

func WithSearchAttributeOrganization

func WithSearchAttributeOrganization(org string) StartWorkflowContextOption

func WithSearchAttributeUserID

func WithSearchAttributeUserID(userID string) StartWorkflowContextOption

func WithWorkflowExecutionErrorWhenAlreadyStarted

func WithWorkflowExecutionErrorWhenAlreadyStarted() StartWorkflowContextOption

func WithWorkflowExecutionTimeout

func WithWorkflowExecutionTimeout(timeout time.Duration) StartWorkflowContextOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL