Versions in this module Expand all Collapse all v1 v1.0.0 Aug 25, 2026 Changes in this version + const MaxActivityDispatchBytes + const MaxChildDispatchBytes + const MaxCompensationDispatchBytes + const MaxDeadLetterPageItems + const MaxFanOut + const MaxHistoryPageEvents + const MaxInspectionHistoryEvents + const MaxInstanceListItems + const MaxOperatorAuditBytes + const MaxPayloadBytes + const MaxTransitionBytes + const MaxTransitionEvents + const MaxTransitionWork + const MaxWorkClaimItems + const MaxWorkLeaseDuration + const MaxWorkerConcurrency + const MaxWorkerPollInterval + var ErrActivityNotFound = errors.New("workflow activity not found") + var ErrDefinitionMismatch = errors.New("workflow definition fingerprint mismatch") + var ErrDefinitionNotFound = errors.New("workflow definition not found") + var ErrDuplicateActivity = errors.New("duplicate workflow activity") + var ErrDuplicateDefinition = errors.New("duplicate workflow definition") + var ErrDuplicateMigration = errors.New("duplicate workflow migration") + var ErrDuplicateTransition = errors.New("workflow transition identity conflict") + var ErrEmptyHistory = errors.New("workflow history is empty") + var ErrHistoryConflict = errors.New("workflow history conflict") + var ErrHistoryLimitExceeded = errors.New("workflow history traversal limit exceeded") + var ErrInvalidActivity = errors.New("invalid workflow activity") + var ErrInvalidActivityOutcome = errors.New("invalid workflow activity outcome") + var ErrInvalidActivityProcessor = errors.New("invalid workflow activity processor") + var ErrInvalidActivityRequest = errors.New("invalid workflow activity request") + var ErrInvalidActivityTransition = errors.New("invalid workflow activity transition") + var ErrInvalidChildProcessor = errors.New("invalid workflow child processor") + var ErrInvalidChildStart = errors.New("invalid workflow child start") + var ErrInvalidChildTransition = errors.New("invalid workflow child transition") + var ErrInvalidCompensation = errors.New("invalid workflow compensation") + var ErrInvalidCompensationProcessor = errors.New("invalid workflow compensation processor") + var ErrInvalidDefinition = errors.New("invalid workflow definition") + var ErrInvalidDefinitionReference = errors.New("invalid workflow definition reference") + var ErrInvalidHistoryEvent = errors.New("invalid workflow history event") + var ErrInvalidMigration = errors.New("invalid workflow migration") + var ErrInvalidOperatorCommand = errors.New("invalid workflow operator command") + var ErrInvalidOrchestration = errors.New("invalid workflow orchestration decision") + var ErrInvalidPendingWork = errors.New("invalid workflow pending work") + var ErrInvalidStoreRequest = errors.New("invalid workflow store request") + var ErrInvalidTransition = errors.New("invalid workflow transition") + var ErrInvalidTransitionPlan = errors.New("invalid workflow transition plan") + var ErrInvalidWait = errors.New("invalid workflow wait") + var ErrInvalidWorkLease = errors.New("invalid workflow work lease") + var ErrInvalidWorker = errors.New("invalid workflow worker") + var ErrMigrationNotFound = errors.New("workflow migration not found") + var ErrStaleWorkLease = errors.New("stale workflow work lease") + var ErrStoreConflict = errors.New("workflow store sequence conflict") + var ErrStoreNotFound = errors.New("workflow store record not found") + func ExportHistory(ctx context.Context, reader HistoryReader, spec HistoryExportSpec, ...) error + func NewStoreCommitError(outcome StoreCommitOutcome, cause error) error + type Activity struct + func NewActivity(name string, handler ActivityHandler) (Activity, error) + func (activity Activity) Execute(ctx context.Context, request ActivityRequest) (ActivityOutcome, error) + func (activity Activity) Name() string + type ActivityAttemptOutcomeSpec struct + Attempt uint32 + Definition Definition + Instance Instance + OccurredAt time.Time + Outcome ActivityOutcome + StepName string + TransitionID string + type ActivityAttemptStartSpec struct + Definition Definition + Instance Instance + Lease WorkLease + StartedAt time.Time + TransitionID string + type ActivityDispatch struct + func DecodeActivityDispatch(payload []byte) (ActivityDispatch, error) + func (dispatch ActivityDispatch) Attempt() uint32 + func (dispatch ActivityDispatch) IdempotencyKey() string + func (dispatch ActivityDispatch) StepName() string + type ActivityExecutionStore interface + ReconcileTransition func(context.Context, TransitionReconciliation) (TransitionReconciliationOutcome, error) + type ActivityHandler func(context.Context, ActivityRequest) ActivityOutcome + type ActivityOutcome struct + func NewActivityOutcome(spec ActivityOutcomeSpec) (ActivityOutcome, error) + func (outcome ActivityOutcome) Code() string + func (outcome ActivityOutcome) Data() []byte + func (outcome ActivityOutcome) Kind() ActivityOutcomeKind + func (outcome ActivityOutcome) Retryable() bool + type ActivityOutcomeKind uint8 + const ActivityFailed + const ActivitySucceeded + const ActivityUnknown + type ActivityOutcomeSpec struct + Code string + Data []byte + Kind ActivityOutcomeKind + Retryable bool + type ActivityProgress struct + func (progress ActivityProgress) Attempt() uint32 + func (progress ActivityProgress) Code() string + func (progress ActivityProgress) DueAt() time.Time + func (progress ActivityProgress) IdempotencyKey() string + func (progress ActivityProgress) Input() []byte + func (progress ActivityProgress) Result() []byte + func (progress ActivityProgress) Retryable() bool + func (progress ActivityProgress) Status() ActivityProgressStatus + func (progress ActivityProgress) StepName() string + type ActivityProgressStatus uint8 + const ActivityProgressFailed + const ActivityProgressReady + const ActivityProgressRetryWaiting + const ActivityProgressRunning + const ActivityProgressSucceeded + const ActivityProgressUnknown + type ActivityRegistry struct + func CompileActivities(activities ...Activity) (*ActivityRegistry, error) + func (registry *ActivityRegistry) Resolve(name string) (Activity, error) + type ActivityRequest struct + func NewActivityRequest(spec ActivityRequestSpec) (ActivityRequest, error) + func (request ActivityRequest) Attempt() uint32 + func (request ActivityRequest) CorrelationID() string + func (request ActivityRequest) Deadline() time.Time + func (request ActivityRequest) Definition() DefinitionReference + func (request ActivityRequest) IdempotencyKey() string + func (request ActivityRequest) Input() []byte + func (request ActivityRequest) InputLimit() uint32 + func (request ActivityRequest) InstanceID() string + func (request ActivityRequest) MaxAttempts() uint32 + func (request ActivityRequest) ResultLimit() uint32 + func (request ActivityRequest) StartedAt() time.Time + func (request ActivityRequest) StepName() string + func (request ActivityRequest) TenantID() string + type ActivityRequestSpec struct + Attempt uint32 + CorrelationID string + Deadline time.Time + Definition DefinitionReference + IdempotencyKey string + Input []byte + InputLimit uint32 + InstanceID string + MaxAttempts uint32 + ResultLimit uint32 + StartedAt time.Time + StepName string + TenantID string + type ActivityRetrySpec struct + CorrelationID string + Deadline time.Time + Definition Definition + IdempotencyKey string + Instance Instance + ScheduledAt time.Time + StepName string + TenantID string + TransitionID string + WorkID string + type ActivityScheduleSpec struct + Attempt uint32 + CorrelationID string + Deadline time.Time + Definition Definition + IdempotencyKey string + Input []byte + Instance Instance + ScheduledAt time.Time + StepName string + TenantID string + TransitionID string + WorkID string + type ActivityWorkProcessor struct + func NewActivityWorkProcessor(config ActivityWorkProcessorConfig) (*ActivityWorkProcessor, error) + func (processor *ActivityWorkProcessor) Process(ctx context.Context, lease WorkLease) (WorkDecision, error) + type ActivityWorkProcessorConfig struct + Activities *ActivityRegistry + Clock Clock + Definitions *Registry + MaxHistoryEvents uint32 + PageSize uint32 + Store ActivityExecutionStore + type AdministrationStore interface + ListInstances func(context.Context, InstanceListQuery) (InstanceListPage, error) + ReconcileTransition func(context.Context, TransitionReconciliation) (TransitionReconciliationOutcome, error) + type ChildDispatch struct + func DecodeChildDispatch(payload []byte) (ChildDispatch, error) + func (dispatch ChildDispatch) Attempt() uint32 + func (dispatch ChildDispatch) ChildID() string + func (dispatch ChildDispatch) Definition() DefinitionReference + func (dispatch ChildDispatch) IdempotencyKey() string + func (dispatch ChildDispatch) StepName() string + type ChildOutcomeSpec struct + ChildID string + CompletedAt time.Time + Definition Definition + FailureCode string + Instance Instance + Result []byte + StepName string + TransitionID string + type ChildProgress struct + func (progress ChildProgress) Attempt() uint32 + func (progress ChildProgress) ChildID() string + func (progress ChildProgress) Code() string + func (progress ChildProgress) Definition() DefinitionReference + func (progress ChildProgress) DueAt() time.Time + func (progress ChildProgress) IdempotencyKey() string + func (progress ChildProgress) Input() []byte + func (progress ChildProgress) Result() []byte + func (progress ChildProgress) Retryable() bool + func (progress ChildProgress) Status() ChildProgressStatus + func (progress ChildProgress) StepName() string + type ChildProgressStatus uint8 + const ChildActive + const ChildFailed + const ChildScheduled + const ChildStartFailedStatus + const ChildStartRetryWaiting + const ChildStartRunning + const ChildStartUnknownStatus + const ChildSucceeded + type ChildScheduleSpec struct + ChildID string + CorrelationID string + Deadline time.Time + Definition Definition + Input []byte + Instance Instance + ScheduledAt time.Time + StepName string + TenantID string + TransitionID string + WorkID string + type ChildStartAttemptOutcomeSpec struct + Attempt uint32 + ChildID string + Definition Definition + Instance Instance + OccurredAt time.Time + Outcome ChildStartOutcome + StepName string + TransitionID string + type ChildStartAttemptSpec struct + Definition Definition + Instance Instance + Lease WorkLease + StartedAt time.Time + TransitionID string + type ChildStartFunc func(context.Context, ChildStartRequest) ChildStartOutcome + func (start ChildStartFunc) Start(ctx context.Context, request ChildStartRequest) ChildStartOutcome + type ChildStartOutcome struct + func NewChildStartOutcome(spec ChildStartOutcomeSpec) (ChildStartOutcome, error) + func (outcome ChildStartOutcome) Code() string + func (outcome ChildStartOutcome) Kind() ChildStartOutcomeKind + func (outcome ChildStartOutcome) Retryable() bool + type ChildStartOutcomeKind uint8 + const ChildStartFailed + const ChildStartUnknown + const ChildStarted + type ChildStartOutcomeSpec struct + Code string + Kind ChildStartOutcomeKind + Retryable bool + type ChildStartRequest struct + func NewChildStartRequest(spec ChildStartRequestSpec) (ChildStartRequest, error) + func (request ChildStartRequest) Attempt() uint32 + func (request ChildStartRequest) ChildDefinition() DefinitionReference + func (request ChildStartRequest) ChildID() string + func (request ChildStartRequest) CorrelationID() string + func (request ChildStartRequest) Deadline() time.Time + func (request ChildStartRequest) IdempotencyKey() string + func (request ChildStartRequest) Input() []byte + func (request ChildStartRequest) MaxAttempts() uint32 + func (request ChildStartRequest) ParentDefinition() DefinitionReference + func (request ChildStartRequest) ParentInstanceID() string + func (request ChildStartRequest) StartedAt() time.Time + func (request ChildStartRequest) StepName() string + func (request ChildStartRequest) TenantID() string + type ChildStartRequestSpec struct + Attempt uint32 + ChildDefinition DefinitionReference + ChildID string + CorrelationID string + Deadline time.Time + IdempotencyKey string + Input []byte + InputLimit uint32 + MaxAttempts uint32 + ParentDefinition DefinitionReference + ParentInstanceID string + StartedAt time.Time + StepName string + TenantID string + type ChildStartRetrySpec struct + CorrelationID string + Deadline time.Time + Definition Definition + Instance Instance + ScheduledAt time.Time + StepName string + TenantID string + TransitionID string + WorkID string + type ChildStarter interface + Start func(context.Context, ChildStartRequest) ChildStartOutcome + type ChildWorkProcessor struct + func NewChildWorkProcessor(config ChildWorkProcessorConfig) (*ChildWorkProcessor, error) + func (processor *ChildWorkProcessor) Process(ctx context.Context, lease WorkLease) (WorkDecision, error) + type ChildWorkProcessorConfig struct + Clock Clock + Definitions *Registry + MaxHistoryEvents uint32 + PageSize uint32 + Starter ChildStarter + Store ActivityExecutionStore + type Clock interface + NewTimer func(time.Duration) ClockTimer + Now func() time.Time + type ClockTimer interface + C func() <-chan time.Time + Stop func() bool + type CompensationAttemptOutcomeSpec struct + Attempt uint32 + Definition Definition + Instance Instance + OccurredAt time.Time + Outcome ActivityOutcome + StepName string + TransitionID string + type CompensationAttemptStartSpec struct + Definition Definition + Instance Instance + Lease WorkLease + StartedAt time.Time + TransitionID string + type CompensationDispatch struct + func DecodeCompensationDispatch(payload []byte) (CompensationDispatch, error) + func (dispatch CompensationDispatch) Attempt() uint32 + func (dispatch CompensationDispatch) IdempotencyKey() string + func (dispatch CompensationDispatch) StepName() string + type CompensationProgress struct + func (progress CompensationProgress) Attempt() uint32 + func (progress CompensationProgress) Code() string + func (progress CompensationProgress) DueAt() time.Time + func (progress CompensationProgress) IdempotencyKey() string + func (progress CompensationProgress) Input() []byte + func (progress CompensationProgress) Result() []byte + func (progress CompensationProgress) Retryable() bool + func (progress CompensationProgress) ScheduledSequence() uint64 + func (progress CompensationProgress) Status() CompensationProgressStatus + func (progress CompensationProgress) StepName() string + type CompensationProgressStatus uint8 + const CompensationFailed + const CompensationManuallyResolved + const CompensationReady + const CompensationRetryWaiting + const CompensationRunning + const CompensationSucceeded + const CompensationUnknown + type CompensationRetrySpec struct + CorrelationID string + Deadline time.Time + Definition Definition + IdempotencyKey string + Instance Instance + ScheduledAt time.Time + StepName string + TenantID string + TransitionID string + WorkID string + type CompensationScheduleSpec struct + Attempt uint32 + CorrelationID string + Deadline time.Time + Definition Definition + IdempotencyKey string + Input []byte + Instance Instance + ScheduledAt time.Time + StepName string + TenantID string + TransitionID string + WorkID string + type CompensationSpec struct + ResultLimit uint32 + Retry RetryPolicy + Target string + Timeout time.Duration + type CompensationWorkProcessor struct + func NewCompensationWorkProcessor(config CompensationWorkProcessorConfig) (*CompensationWorkProcessor, error) + func (processor *CompensationWorkProcessor) Process(ctx context.Context, lease WorkLease) (WorkDecision, error) + type CompensationWorkProcessorConfig struct + Clock Clock + Compensations *ActivityRegistry + Definitions *Registry + MaxHistoryEvents uint32 + PageSize uint32 + Store ActivityExecutionStore + type DeadLetterCursor struct + func NewDeadLetterCursor(spec DeadLetterCursorSpec) (DeadLetterCursor, error) + func (cursor DeadLetterCursor) FailedAt() time.Time + func (cursor DeadLetterCursor) WorkID() string + type DeadLetterCursorSpec struct + FailedAt time.Time + WorkID string + type DeadLetterPage struct + func NewDeadLetterPage(query DeadLetterQuery, items []DeadLetterRecord, hasMore bool) (DeadLetterPage, error) + func (page DeadLetterPage) HasMore() bool + func (page DeadLetterPage) Items() []DeadLetterRecord + func (page DeadLetterPage) NextCursor() DeadLetterCursor + type DeadLetterQuery struct + func NewDeadLetterQuery(spec DeadLetterQuerySpec) (DeadLetterQuery, error) + func (query DeadLetterQuery) After() DeadLetterCursor + func (query DeadLetterQuery) Limit() uint32 + func (query DeadLetterQuery) Valid() bool + type DeadLetterQuerySpec struct + After DeadLetterCursor + Limit uint32 + type DeadLetterRecord struct + func NewDeadLetterRecord(spec DeadLetterRecordSpec) (DeadLetterRecord, error) + func (record DeadLetterRecord) Attempt() uint32 + func (record DeadLetterRecord) FailedAt() time.Time + func (record DeadLetterRecord) FailureCode() string + func (record DeadLetterRecord) Token() uint64 + func (record DeadLetterRecord) Work() PendingWork + type DeadLetterRecordSpec struct + Attempt uint32 + FailedAt time.Time + FailureCode string + Token uint64 + Work PendingWork + type DeadLetterResolution struct + func NewDeadLetterResolution(spec DeadLetterResolutionSpec) (DeadLetterResolution, error) + func (resolution DeadLetterResolution) Action() DeadLetterResolutionAction + func (resolution DeadLetterResolution) Actor() string + func (resolution DeadLetterResolution) CommandID() string + func (resolution DeadLetterResolution) Deadline() time.Time + func (resolution DeadLetterResolution) Fingerprint() string + func (resolution DeadLetterResolution) OccurredAt() time.Time + func (resolution DeadLetterResolution) Reason() string + func (resolution DeadLetterResolution) RetryAt() time.Time + func (resolution DeadLetterResolution) Token() uint64 + func (resolution DeadLetterResolution) Valid() bool + func (resolution DeadLetterResolution) WorkID() string + type DeadLetterResolutionAction uint8 + const DeadLetterDiscard + const DeadLetterRetry + func (action DeadLetterResolutionAction) String() string + type DeadLetterResolutionSpec struct + Action DeadLetterResolutionAction + Actor string + CommandID string + Deadline time.Time + OccurredAt time.Time + Reason string + RetryAt time.Time + Token uint64 + WorkID string + type DeadLetterStore interface + ListDeadLetters func(context.Context, DeadLetterQuery) (DeadLetterPage, error) + ResolveDeadLetter func(context.Context, DeadLetterResolution) error + type Definition struct + func NewDefinition(spec DefinitionSpec) (Definition, error) + func (definition Definition) Deprecated() bool + func (definition Definition) Fingerprint() string + func (definition Definition) Mode() ExecutionMode + func (definition Definition) Name() string + func (definition Definition) Reference() DefinitionReference + func (definition Definition) Steps() []StepSpec + func (definition Definition) Version() string + type DefinitionReference struct + func NewDefinitionReference(name, version, fingerprint string) (DefinitionReference, error) + func (reference DefinitionReference) Fingerprint() string + func (reference DefinitionReference) Name() string + func (reference DefinitionReference) Version() string + type DefinitionSpec struct + Deprecated bool + Mode ExecutionMode + Name string + Steps []StepSpec + Version string + type EventKind uint8 + const EventActivityAttemptFailed + const EventActivityAttemptStarted + const EventActivityAttemptSucceeded + const EventActivityAttemptUnknown + const EventActivityRetryScheduled + const EventActivityScheduled + const EventCancellationRequested + const EventChildCompleted + const EventChildFailed + const EventChildScheduled + const EventChildStartAttempted + const EventChildStartFailed + const EventChildStartRetryScheduled + const EventChildStartUnknown + const EventChildStarted + const EventCompensationAttemptFailed + const EventCompensationAttemptStarted + const EventCompensationAttemptSucceeded + const EventCompensationAttemptUnknown + const EventCompensationManuallyResolved + const EventCompensationRetryScheduled + const EventCompensationScheduled + const EventContinuedAsNew + const EventDefinitionMigrated + const EventInstanceCancelled + const EventInstanceCompleted + const EventInstanceFailed + const EventInstancePaused + const EventInstanceResumed + const EventInstanceStarted + const EventInstanceTerminated + const EventOperatorCommandRecorded + const EventRaceWon + const EventSignalReceived + const EventTimerFired + const EventTimerScheduled + type ExecutionMode uint8 + const Choreography + const Orchestration + type HistoryEvent struct + func NewHistoryEvent(spec HistoryEventSpec) (HistoryEvent, error) + func (event HistoryEvent) Attempt() uint32 + func (event HistoryEvent) Code() string + func (event HistoryEvent) Data() []byte + func (event HistoryEvent) Definition() DefinitionReference + func (event HistoryEvent) DueAt() time.Time + func (event HistoryEvent) IdempotencyKey() string + func (event HistoryEvent) InstanceID() string + func (event HistoryEvent) Kind() EventKind + func (event HistoryEvent) OccurredAt() time.Time + func (event HistoryEvent) Retryable() bool + func (event HistoryEvent) Sequence() uint64 + func (event HistoryEvent) StepName() string + func (event HistoryEvent) SuccessorID() string + type HistoryEventSpec struct + Attempt uint32 + Code string + Data []byte + Definition DefinitionReference + DueAt time.Time + IdempotencyKey string + InstanceID string + Kind EventKind + OccurredAt time.Time + Retryable bool + Sequence uint64 + StepName string + SuccessorID string + type HistoryExportSink func(context.Context, []HistoryEvent) error + type HistoryExportSpec struct + InstanceID string + MaxEvents uint32 + PageSize uint32 + type HistoryPage struct + func NewHistoryPage(query HistoryQuery, events []HistoryEvent, hasMore bool) (HistoryPage, error) + func (page HistoryPage) Events() []HistoryEvent + func (page HistoryPage) HasMore() bool + func (page HistoryPage) NextAfterSequence() uint64 + type HistoryQuery struct + func NewHistoryQuery(spec HistoryQuerySpec) (HistoryQuery, error) + func (query HistoryQuery) AfterSequence() uint64 + func (query HistoryQuery) InstanceID() string + func (query HistoryQuery) Limit() uint32 + func (query HistoryQuery) Valid() bool + type HistoryQuerySpec struct + AfterSequence uint64 + InstanceID string + Limit uint32 + type HistoryReader interface + History func(context.Context, HistoryQuery) (HistoryPage, error) + type Instance struct + func InspectInstance(ctx context.Context, reader HistoryReader, registry *Registry, ...) (Instance, error) + func Replay(registry *Registry, events []HistoryEvent) (Instance, error) + func (instance Instance) Activities() []ActivityProgress + func (instance Instance) Activity(stepName string) (ActivityProgress, bool) + func (instance Instance) Child(stepName string) (ChildProgress, bool) + func (instance Instance) Children() []ChildProgress + func (instance Instance) Compensation(stepName string) (CompensationProgress, bool) + func (instance Instance) Compensations() []CompensationProgress + func (instance Instance) Definition() DefinitionReference + func (instance Instance) ID() string + func (instance Instance) Input() []byte + func (instance Instance) OperatorActions() []OperatorActionRecord + func (instance Instance) Race(stepName string) (RaceProgress, bool) + func (instance Instance) Races() []RaceProgress + func (instance Instance) Result() []byte + func (instance Instance) Sequence() uint64 + func (instance Instance) Signal(stepName string) (SignalProgress, bool) + func (instance Instance) Signals() []SignalProgress + func (instance Instance) SnapshotDigest() string + func (instance Instance) StartedAt() time.Time + func (instance Instance) Status() InstanceStatus + func (instance Instance) SuccessorID() string + func (instance Instance) Timer(stepName string) (TimerProgress, bool) + func (instance Instance) Timers() []TimerProgress + func (instance Instance) UpdatedAt() time.Time + type InstanceInspectionSpec struct + InstanceID string + MaxEvents uint32 + PageSize uint32 + type InstanceListCursor struct + func NewInstanceListCursor(spec InstanceListCursorSpec) (InstanceListCursor, error) + func (cursor InstanceListCursor) CreatedAt() time.Time + func (cursor InstanceListCursor) InstanceID() string + type InstanceListCursorSpec struct + CreatedAt time.Time + InstanceID string + type InstanceListPage struct + func NewInstanceListPage(query InstanceListQuery, items []InstanceRecord, hasMore bool) (InstanceListPage, error) + func (page InstanceListPage) HasMore() bool + func (page InstanceListPage) Items() []InstanceRecord + func (page InstanceListPage) NextCursor() InstanceListCursor + type InstanceListQuery struct + func NewInstanceListQuery(spec InstanceListQuerySpec) (InstanceListQuery, error) + func (query InstanceListQuery) After() InstanceListCursor + func (query InstanceListQuery) Limit() uint32 + func (query InstanceListQuery) Selection() InstanceListSelection + func (query InstanceListQuery) Valid() bool + type InstanceListQuerySpec struct + After InstanceListCursor + Limit uint32 + Selection InstanceListSelection + type InstanceListSelection uint8 + const ListActiveInstances + const ListAllInstances + const ListArchivedInstances + type InstanceRecord struct + func NewInstanceRecord(spec InstanceRecordSpec) (InstanceRecord, error) + func (record InstanceRecord) ArchivedAt() time.Time + func (record InstanceRecord) CreatedAt() time.Time + func (record InstanceRecord) Definition() DefinitionReference + func (record InstanceRecord) InstanceID() string + func (record InstanceRecord) Sequence() uint64 + func (record InstanceRecord) UpdatedAt() time.Time + type InstanceRecordSpec struct + ArchivedAt time.Time + CreatedAt time.Time + Definition DefinitionReference + InstanceID string + Sequence uint64 + UpdatedAt time.Time + type InstanceStatus uint8 + const StatusCancelled + const StatusCancelling + const StatusCompleted + const StatusContinuedAsNew + const StatusFailed + const StatusPaused + const StatusRunning + const StatusTerminated + type Migration struct + Apply func(MigrationState) (MigrationState, error) + FromVersion string + Name string + ToVersion string + type MigrationState struct + Data []byte + type OperatorAction uint8 + const OperatorApprove + const OperatorCancel + const OperatorCompensate + const OperatorPause + const OperatorResolveCompensation + const OperatorResume + const OperatorRetryActivity + const OperatorTerminate + func (action OperatorAction) String() string + type OperatorActionRecord struct + func (record OperatorActionRecord) Action() OperatorAction + func (record OperatorActionRecord) Actor() string + func (record OperatorActionRecord) CommandID() string + func (record OperatorActionRecord) OccurredAt() time.Time + func (record OperatorActionRecord) Reason() string + type OperatorActivityRetrySpec struct + Actor string + CommandID string + CorrelationID string + Deadline time.Time + Definition Definition + IdempotencyKey string + Instance Instance + OccurredAt time.Time + Reason string + StepName string + TenantID string + WorkID string + type OperatorApprovalSpec struct + Actor string + CommandID string + Definition Definition + Instance Instance + OccurredAt time.Time + Payload []byte + Reason string + StepName string + type OperatorCompensationResolutionSpec struct + Actor string + Code string + CommandID string + Definition Definition + Evidence []byte + Instance Instance + OccurredAt time.Time + Reason string + StepName string + type OperatorCompensationSpec struct + Actor string + Attempt uint32 + CommandID string + CorrelationID string + Deadline time.Time + Definition Definition + IdempotencyKey string + Input []byte + Instance Instance + OccurredAt time.Time + Reason string + StepName string + TenantID string + WorkID string + type OperatorLifecycleCommandSpec struct + Action OperatorAction + Actor string + CommandID string + Instance Instance + OccurredAt time.Time + Reason string + type OrchestrationBranchSpec struct + IdempotencyKey string + Input []byte + StepName string + WorkID string + type OrchestrationDecision struct + func NewOrchestrationDecision(spec OrchestrationDecisionSpec) (OrchestrationDecision, error) + func (decision OrchestrationDecision) Kind() OrchestrationDecisionKind + func (decision OrchestrationDecision) StepName() string + func (decision OrchestrationDecision) Transition() Transition + type OrchestrationDecisionKind uint8 + const OrchestrationCompleted + const OrchestrationFailed + const OrchestrationRecorded + const OrchestrationScheduled + const OrchestrationWaiting + type OrchestrationDecisionSpec struct + Branches []OrchestrationBranchSpec + ChildID string + CorrelationID string + Deadline time.Time + DecidedAt time.Time + Definition Definition + IdempotencyKey string + Input []byte + Instance Instance + Result []byte + TenantID string + TransitionID string + WorkID string + type PendingWork struct + func NewPendingWork(spec PendingWorkSpec) (PendingWork, error) + func (work PendingWork) AvailableAt() time.Time + func (work PendingWork) CorrelationID() string + func (work PendingWork) Deadline() time.Time + func (work PendingWork) ID() string + func (work PendingWork) InstanceID() string + func (work PendingWork) Kind() WorkKind + func (work PendingWork) Payload() []byte + func (work PendingWork) Sequence() uint64 + func (work PendingWork) TenantID() string + type PendingWorkSpec struct + AvailableAt time.Time + CorrelationID string + Deadline time.Time + ID string + InstanceID string + Kind WorkKind + Payload []byte + Sequence uint64 + TenantID string + type RaceProgress struct + func (progress RaceProgress) DecidedAt() time.Time + func (progress RaceProgress) StepName() string + func (progress RaceProgress) WinnerStepName() string + type Registry struct + func CompileDefinitions(definitions ...Definition) (*Registry, error) + func CompileRegistry(definitions []Definition, migrations []Migration) (*Registry, error) + func (registry *Registry) Migration(name, fromVersion, toVersion string) (Migration, error) + func (registry *Registry) Resolve(name, version string) (Definition, error) + type RetryPolicy struct + InitialDelay time.Duration + MaxAttempts uint32 + MaxDelay time.Duration + type SignalAcceptanceSpec struct + Definition Definition + ExpectedSequence uint64 + InstanceID string + Payload []byte + ReceivedAt time.Time + SignalID string + StepName string + type SignalProgress struct + func (progress SignalProgress) Payload() []byte + func (progress SignalProgress) ReceivedAt() time.Time + func (progress SignalProgress) SignalID() string + func (progress SignalProgress) StepName() string + type StepKind uint8 + const StepActivity + const StepApproval + const StepChild + const StepJoin + const StepParallel + const StepRace + const StepSignal + const StepTimer + type StepSpec struct + Branches []string + ChildDefinition DefinitionReference + Compensation *CompensationSpec + FanOutLimit uint32 + InputLimit uint32 + Kind StepKind + Name string + ResultLimit uint32 + Retry RetryPolicy + Target string + Timeout time.Duration + type StoreCommitError struct + func (commitError *StoreCommitError) CommitOutcome() StoreCommitOutcome + func (commitError *StoreCommitError) Error() string + func (commitError *StoreCommitError) Unwrap() error + type StoreCommitOutcome uint8 + const StoreCommitCommitted + const StoreCommitNotCommitted + const StoreCommitUnknown + func StoreCommitOutcomeOf(err error) StoreCommitOutcome + type SystemClock struct + func (SystemClock) NewTimer(duration time.Duration) ClockTimer + func (SystemClock) Now() time.Time + type TimerFireSpec struct + Definition Definition + ExpectedSequence uint64 + FiredAt time.Time + Lease WorkLease + TransitionID string + type TimerProgress struct + func (progress TimerProgress) DueAt() time.Time + func (progress TimerProgress) FiredAt() time.Time + func (progress TimerProgress) Status() TimerProgressStatus + func (progress TimerProgress) StepName() string + type TimerProgressStatus uint8 + const TimerFired + const TimerWaiting + type TimerScheduleSpec struct + CorrelationID string + Deadline time.Time + Definition Definition + ExpectedSequence uint64 + InstanceID string + ScheduledAt time.Time + StepName string + TenantID string + TransitionID string + WorkID string + type Transition struct + func NewActivityAttemptOutcome(spec ActivityAttemptOutcomeSpec) (Transition, error) + func NewActivityAttemptStart(spec ActivityAttemptStartSpec) (Transition, error) + func NewActivityRetry(spec ActivityRetrySpec) (Transition, error) + func NewActivitySchedule(spec ActivityScheduleSpec) (Transition, error) + func NewChildOutcome(spec ChildOutcomeSpec) (Transition, error) + func NewChildSchedule(spec ChildScheduleSpec) (Transition, error) + func NewChildStartAttempt(spec ChildStartAttemptSpec) (Transition, error) + func NewChildStartAttemptOutcome(spec ChildStartAttemptOutcomeSpec) (Transition, error) + func NewChildStartRetry(spec ChildStartRetrySpec) (Transition, error) + func NewCompensationAttemptOutcome(spec CompensationAttemptOutcomeSpec) (Transition, error) + func NewCompensationAttemptStart(spec CompensationAttemptStartSpec) (Transition, error) + func NewCompensationRetry(spec CompensationRetrySpec) (Transition, error) + func NewCompensationSchedule(spec CompensationScheduleSpec) (Transition, error) + func NewOperatorActivityRetry(spec OperatorActivityRetrySpec) (Transition, error) + func NewOperatorApproval(spec OperatorApprovalSpec) (Transition, error) + func NewOperatorCompensation(spec OperatorCompensationSpec) (Transition, error) + func NewOperatorCompensationResolution(spec OperatorCompensationResolutionSpec) (Transition, error) + func NewOperatorLifecycleCommand(spec OperatorLifecycleCommandSpec) (Transition, error) + func NewSignalAcceptance(spec SignalAcceptanceSpec) (Transition, error) + func NewTimerFire(spec TimerFireSpec) (Transition, error) + func NewTimerSchedule(spec TimerScheduleSpec) (Transition, error) + func NewTransition(spec TransitionSpec) (Transition, error) + func (transition Transition) Definition() DefinitionReference + func (transition Transition) Events() []HistoryEvent + func (transition Transition) ExpectedSequence() uint64 + func (transition Transition) Fingerprint() string + func (transition Transition) ID() string + func (transition Transition) InstanceID() string + func (transition Transition) Valid() bool + func (transition Transition) Work() []PendingWork + type TransitionReconciliation struct + func NewTransitionReconciliation(spec TransitionReconciliationSpec) (TransitionReconciliation, error) + func (reconciliation TransitionReconciliation) Fingerprint() string + func (reconciliation TransitionReconciliation) TransitionID() string + func (reconciliation TransitionReconciliation) Valid() bool + type TransitionReconciliationOutcome uint8 + const TransitionCommitted + const TransitionConflicting + const TransitionMissing + type TransitionReconciliationSpec struct + Fingerprint string + TransitionID string + type TransitionSpec struct + Definition DefinitionReference + Events []HistoryEvent + ExpectedSequence uint64 + ID string + InstanceID string + Work []PendingWork + type TransitionStore interface + Commit func(context.Context, Transition) error + History func(context.Context, HistoryQuery) (HistoryPage, error) + type WorkClaimRequest struct + func NewWorkClaimRequest(spec WorkClaimRequestSpec) (WorkClaimRequest, error) + func (request WorkClaimRequest) LeaseDuration() time.Duration + func (request WorkClaimRequest) Limit() uint32 + func (request WorkClaimRequest) Now() time.Time + func (request WorkClaimRequest) Owner() string + func (request WorkClaimRequest) Valid() bool + type WorkClaimRequestSpec struct + LeaseDuration time.Duration + Limit uint32 + Now time.Time + Owner string + type WorkCompletion struct + func NewWorkCompletion(spec WorkCompletionSpec) (WorkCompletion, error) + func (completion WorkCompletion) CompletedAt() time.Time + func (completion WorkCompletion) Owner() string + func (completion WorkCompletion) Token() uint64 + func (completion WorkCompletion) Valid() bool + func (completion WorkCompletion) WorkID() string + type WorkCompletionSpec struct + CompletedAt time.Time + Owner string + Token uint64 + WorkID string + type WorkDecision struct + func NewWorkDecision(spec WorkDecisionSpec) (WorkDecision, error) + func (decision WorkDecision) Code() string + func (decision WorkDecision) Kind() WorkDecisionKind + func (decision WorkDecision) RetryAt() time.Time + func (decision WorkDecision) Valid() bool + type WorkDecisionKind uint8 + const WorkComplete + const WorkDeadLetterDecision + const WorkRetryDecision + type WorkDecisionSpec struct + Code string + Kind WorkDecisionKind + RetryAt time.Time + type WorkDisposition uint8 + const WorkDeadLetter + const WorkRetry + type WorkFailure struct + func NewWorkFailure(spec WorkFailureSpec) (WorkFailure, error) + func (failure WorkFailure) Code() string + func (failure WorkFailure) Disposition() WorkDisposition + func (failure WorkFailure) FailedAt() time.Time + func (failure WorkFailure) Owner() string + func (failure WorkFailure) RetryAt() time.Time + func (failure WorkFailure) Token() uint64 + func (failure WorkFailure) Valid() bool + func (failure WorkFailure) WorkID() string + type WorkFailureSpec struct + Code string + Disposition WorkDisposition + FailedAt time.Time + Owner string + RetryAt time.Time + Token uint64 + WorkID string + type WorkKind uint8 + const WorkActivity + const WorkChild + const WorkCompensation + const WorkPublication + const WorkReconciliation + const WorkTimer + type WorkLease struct + func NewWorkLease(spec WorkLeaseSpec) (WorkLease, error) + func (lease WorkLease) Attempt() uint32 + func (lease WorkLease) ClaimedAt() time.Time + func (lease WorkLease) ExpiresAt() time.Time + func (lease WorkLease) Owner() string + func (lease WorkLease) Token() uint64 + func (lease WorkLease) Valid() bool + func (lease WorkLease) Work() PendingWork + type WorkLeaseRenewal struct + func NewWorkLeaseRenewal(spec WorkLeaseRenewalSpec) (WorkLeaseRenewal, error) + func (renewal WorkLeaseRenewal) ExtendBy() time.Duration + func (renewal WorkLeaseRenewal) Now() time.Time + func (renewal WorkLeaseRenewal) Owner() string + func (renewal WorkLeaseRenewal) Token() uint64 + func (renewal WorkLeaseRenewal) Valid() bool + func (renewal WorkLeaseRenewal) WorkID() string + type WorkLeaseRenewalSpec struct + ExtendBy time.Duration + Now time.Time + Owner string + Token uint64 + WorkID string + type WorkLeaseSpec struct + Attempt uint32 + ClaimedAt time.Time + ExpiresAt time.Time + Owner string + Token uint64 + Work PendingWork + type WorkProcessor interface + Process func(context.Context, WorkLease) (WorkDecision, error) + type WorkStore interface + Claim func(context.Context, WorkClaimRequest) ([]WorkLease, error) + Complete func(context.Context, WorkCompletion) error + Fail func(context.Context, WorkFailure) error + Renew func(context.Context, WorkLeaseRenewal) (WorkLease, error) + type Worker struct + func NewWorker(config WorkerConfig) (*Worker, error) + func (worker *Worker) Handle(ctx context.Context, lease WorkLease) error + func (worker *Worker) Run(ctx context.Context) error + type WorkerConfig struct + ClaimLimit uint32 + Clock Clock + FinalizeTimeout time.Duration + Hooks WorkerHooks + LeaseDuration time.Duration + MaxConcurrent uint32 + Owner string + PollInterval time.Duration + Processor WorkProcessor + RenewEvery time.Duration + Store WorkStore + type WorkerEvent struct + func (event WorkerEvent) At() time.Time + func (event WorkerEvent) Attempt() uint32 + func (event WorkerEvent) Cause() error + func (event WorkerEvent) Kind() WorkerEventKind + func (event WorkerEvent) WorkID() string + func (event WorkerEvent) WorkKind() WorkKind + type WorkerEventKind uint8 + const WorkerClaimFailed + const WorkerCompleted + const WorkerDeadLettered + const WorkerLeaseLost + const WorkerLeaseRenewed + const WorkerProcessingFailed + const WorkerProcessingStarted + const WorkerRetryScheduled + const WorkerWorkClaimed + const WorkerWorkReadmitted + type WorkerHooks interface + OnWorkerEvent func(WorkerEvent)