Documentation
¶
Overview ¶
Package workflow is a generated GoMock package.
Package workflow is a generated GoMock package.
Package workflow is a generated GoMock package.
Package workflow is a generated GoMock package.
Package workflow is a generated GoMock package.
Package workflow is a generated GoMock package.
Index ¶
- Constants
- Variables
- func ActivityMatchWorkflowRules(ms historyi.MutableState, timeSource clock.TimeSource, logger log.Logger, ...) bool
- func AddNextStateMachineTimerTask(ms historyi.MutableState)
- func ExponentialBackoffAlgorithm(initInterval *durationpb.Duration, backoffCoefficient float64, ...) time.Duration
- func FindAutoResetPoint(timeSource clock.TimeSource, verifyChecksum func(string) error, ...) (string, *workflowpb.ResetPointInfo)
- func GetActivityState(ai *persistencespb.ActivityInfo) enumspb.PendingActivityState
- func GetEffectiveDeployment(versioningInfo *workflowpb.WorkflowExecutionVersioningInfo) *deploymentpb.Deployment
- func GetEffectiveVersioningBehavior(versioningInfo *workflowpb.WorkflowExecutionVersioningInfo) enumspb.VersioningBehavior
- func GetNextScheduledTime(ai *persistencespb.ActivityInfo) time.Time
- func GetPendingActivityInfo(ctx context.Context, shardContext historyi.ShardContext, ...) (*workflowpb.PendingActivityInfo, error)
- func GetPerTaskQueueFamilyScope(handler metrics.Handler, namespaceName namespace.Name, taskQueueFamily string, ...) metrics.Handler
- func MatchWorkflowRule(executionInfo *persistencespb.WorkflowExecutionInfo, ...) (bool, error)
- func MutableStateFailoverVersion(mutableState historyi.MutableState) *int64
- func NewMapEventCache(t *testing.T, m map[events.EventKey]*historypb.HistoryEvent) events.Cache
- func NewQueryRegistry() historyi.QueryRegistry
- func NewTimerSequence(mutableState historyi.MutableState) *timerSequenceImpl
- func NotifyNewHistoryMutationEvent(engine historyi.Engine, workflowMutation *persistence.WorkflowMutation) error
- func NotifyNewHistorySnapshotEvent(engine historyi.Engine, workflowSnapshot *persistence.WorkflowSnapshot) error
- func NotifyWorkflowMutationTasks(engine historyi.Engine, workflowMutation *persistence.WorkflowMutation)
- func NotifyWorkflowSnapshotTasks(engine historyi.Engine, workflowSnapshot *persistence.WorkflowSnapshot)
- func PauseActivity(mutableState historyi.MutableState, activityId string, ...) error
- func PersistWorkflowEvents(ctx context.Context, shardContext historyi.ShardContext, ...) (int64, error)
- func RefreshTasksForWorkflowStart(ctx context.Context, mutableState historyi.MutableState, ...) error
- func RegisterStateMachine(reg *hsm.Registry) error
- func ResetActivity(shardContext historyi.ShardContext, mutableState historyi.MutableState, ...) error
- func SanitizeMutableState(workflowMutableState *persistencespb.WorkflowMutableState)
- func SanitizeMutableStateMutation(mutableStateMutation *persistencespb.WorkflowMutableStateMutation)
- func SanitizeStateMachineNode(node *persistencespb.StateMachineNode)
- func ScheduleWorkflowTask(mutableState historyi.MutableState) error
- func SetupNewWorkflowForRetryOrCron(ctx context.Context, previousMutableState historyi.MutableState, ...) error
- func TerminateWorkflow(mutableState historyi.MutableState, terminateReason string, ...) error
- func TestCloneToProto(mutableState historyi.MutableState) *persistencespb.WorkflowMutableState
- func TimeoutWorkflow(mutableState historyi.MutableState, retryState enumspb.RetryState, ...) error
- func TrackStateMachineTimer(ms historyi.MutableState, deadline time.Time, ...)
- func TransitionHistoryStalenessCheck(history []*persistencespb.VersionedTransition, ...) error
- func TrimStateMachineTimers(mutableState historyi.MutableState, ...) error
- func UnpauseActivity(shardContext historyi.ShardContext, mutableState historyi.MutableState, ...) error
- func UnpauseActivityWithReset(shardContext historyi.ShardContext, mutableState historyi.MutableState, ...) (*historyservice.UnpauseActivityResponse, error)
- func UnpauseActivityWithResume(shardContext historyi.ShardContext, mutableState historyi.MutableState, ...) (*historyservice.UnpauseActivityResponse, error)
- func UpdateActivityInfoForRetries(ai *persistencespb.ActivityInfo, version int64, attempt int32, ...) *persistencespb.ActivityInfo
- func UpdatedTransitionHistory(history []*persistencespb.VersionedTransition, namespaceFailoverVersion int64) []*persistencespb.VersionedTransition
- type BackoffCalculatorAlgorithmFunc
- type CommandHandler
- type CommandHandlerRegistry
- type CommandValidator
- type ContextImpl
- func (c *ContextImpl) CacheSize() int
- func (c *ContextImpl) Clear()
- func (c *ContextImpl) ConflictResolveWorkflowExecution(ctx context.Context, shardContext historyi.ShardContext, ...) (retError error)
- func (c *ContextImpl) CreateWorkflowExecution(ctx context.Context, shardContext historyi.ShardContext, ...) (retError error)
- func (c *ContextImpl) GetNamespace(shardContext historyi.ShardContext) namespace.Name
- func (c *ContextImpl) GetWorkflowKey() definition.WorkflowKey
- func (c *ContextImpl) IsDirty() bool
- func (c *ContextImpl) LoadExecutionStats(ctx context.Context, shardContext historyi.ShardContext) (*persistencespb.ExecutionStats, error)
- func (c *ContextImpl) LoadMutableState(ctx context.Context, shardContext historyi.ShardContext) (historyi.MutableState, error)
- func (c *ContextImpl) Lock(ctx context.Context, lockPriority locks.Priority) error
- func (c *ContextImpl) PersistWorkflowEvents(ctx context.Context, shardContext historyi.ShardContext, ...) (int64, error)
- func (c *ContextImpl) ReapplyEvents(ctx context.Context, shardContext historyi.ShardContext, ...) error
- func (c *ContextImpl) RefreshTasks(ctx context.Context, shardContext historyi.ShardContext) error
- func (c *ContextImpl) SetWorkflowExecution(ctx context.Context, shardContext historyi.ShardContext) (retError error)
- func (c *ContextImpl) SubmitClosedWorkflowSnapshot(ctx context.Context, shardContext historyi.ShardContext, ...) (retError error)
- func (c *ContextImpl) Unlock()
- func (c *ContextImpl) UpdateRegistry(ctx context.Context) update.Registry
- func (c *ContextImpl) UpdateWorkflowExecutionAsActive(ctx context.Context, shardContext historyi.ShardContext) error
- func (c *ContextImpl) UpdateWorkflowExecutionAsPassive(ctx context.Context, shardContext historyi.ShardContext) error
- func (c *ContextImpl) UpdateWorkflowExecutionWithNew(ctx context.Context, shardContext historyi.ShardContext, ...) (retError error)
- func (c *ContextImpl) UpdateWorkflowExecutionWithNewAsActive(ctx context.Context, shardContext historyi.ShardContext, ...) error
- func (c *ContextImpl) UpdateWorkflowExecutionWithNewAsPassive(ctx context.Context, shardContext historyi.ShardContext, ...) error
- type FailWorkflowTaskError
- type MockMutableStateRebuilder
- type MockMutableStateRebuilderMockRecorder
- type MockTaskGenerator
- func (m *MockTaskGenerator) EXPECT() *MockTaskGeneratorMockRecorder
- func (m *MockTaskGenerator) GenerateActivityRetryTasks(activityInfo *persistence.ActivityInfo) error
- func (m *MockTaskGenerator) GenerateActivityTasks(activityScheduledEventID int64) error
- func (m *MockTaskGenerator) GenerateActivityTimerTasks() error
- func (m *MockTaskGenerator) GenerateChildWorkflowTasks(event *history.HistoryEvent) error
- func (m *MockTaskGenerator) GenerateDelayedWorkflowTasks(startEvent *history.HistoryEvent) error
- func (m *MockTaskGenerator) GenerateDeleteExecutionTask() (*tasks.DeleteExecutionTask, error)
- func (m *MockTaskGenerator) GenerateDeleteHistoryEventTask(closeTime time.Time) error
- func (m *MockTaskGenerator) GenerateDirtySubStateMachineTasks(stateMachineRegistry *hsm.Registry) error
- func (m *MockTaskGenerator) GenerateHistoryReplicationTasks(eventBatches [][]*history.HistoryEvent) ([]tasks.Task, error)
- func (m *MockTaskGenerator) GenerateMigrationTasks() ([]tasks.Task, int64, error)
- func (m *MockTaskGenerator) GenerateRecordWorkflowStartedTasks(startEvent *history.HistoryEvent) error
- func (m *MockTaskGenerator) GenerateRequestCancelExternalTasks(event *history.HistoryEvent) error
- func (m *MockTaskGenerator) GenerateScheduleSpeculativeWorkflowTaskTasks(workflowTask *interfaces.WorkflowTaskInfo) error
- func (m *MockTaskGenerator) GenerateScheduleWorkflowTaskTasks(workflowTaskScheduledEventID int64) error
- func (m *MockTaskGenerator) GenerateSignalExternalTasks(event *history.HistoryEvent) error
- func (m *MockTaskGenerator) GenerateStartWorkflowTaskTasks(workflowTaskScheduledEventID int64) error
- func (m *MockTaskGenerator) GenerateUpsertVisibilityTask() error
- func (m *MockTaskGenerator) GenerateUserTimerTasks() error
- func (m *MockTaskGenerator) GenerateWorkflowCloseTasks(closedTime time.Time, deleteAfterClose bool) error
- func (m *MockTaskGenerator) GenerateWorkflowResetTasks() error
- func (m *MockTaskGenerator) GenerateWorkflowStartTasks(startEvent *history.HistoryEvent) (int32, error)
- type MockTaskGeneratorMockRecorder
- func (mr *MockTaskGeneratorMockRecorder) GenerateActivityRetryTasks(activityInfo any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateActivityTasks(activityScheduledEventID any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateActivityTimerTasks() *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateChildWorkflowTasks(event any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateDelayedWorkflowTasks(startEvent any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateDeleteExecutionTask() *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateDeleteHistoryEventTask(closeTime any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateDirtySubStateMachineTasks(stateMachineRegistry any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateHistoryReplicationTasks(eventBatches any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateMigrationTasks() *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateRecordWorkflowStartedTasks(startEvent any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateRequestCancelExternalTasks(event any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateScheduleSpeculativeWorkflowTaskTasks(workflowTask any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateScheduleWorkflowTaskTasks(workflowTaskScheduledEventID any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateSignalExternalTasks(event any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateStartWorkflowTaskTasks(workflowTaskScheduledEventID any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateUpsertVisibilityTask() *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateUserTimerTasks() *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateWorkflowCloseTasks(closedTime, deleteAfterClose any) *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateWorkflowResetTasks() *gomock.Call
- func (mr *MockTaskGeneratorMockRecorder) GenerateWorkflowStartTasks(startEvent any) *gomock.Call
- type MockTaskRefresher
- type MockTaskRefresherMockRecorder
- type MockTimerSequence
- func (m *MockTimerSequence) CreateNextActivityTimer() (bool, error)
- func (m *MockTimerSequence) CreateNextUserTimer() (bool, error)
- func (m *MockTimerSequence) EXPECT() *MockTimerSequenceMockRecorder
- func (m *MockTimerSequence) LoadAndSortActivityTimers() []TimerSequenceID
- func (m *MockTimerSequence) LoadAndSortUserTimers() []TimerSequenceID
- type MockTimerSequenceMockRecorder
- func (mr *MockTimerSequenceMockRecorder) CreateNextActivityTimer() *gomock.Call
- func (mr *MockTimerSequenceMockRecorder) CreateNextUserTimer() *gomock.Call
- func (mr *MockTimerSequenceMockRecorder) LoadAndSortActivityTimers() *gomock.Call
- func (mr *MockTimerSequenceMockRecorder) LoadAndSortUserTimers() *gomock.Call
- type MockTransaction
- func (m *MockTransaction) ConflictResolveWorkflowExecution(ctx context.Context, ...) (int64, int64, int64, error)
- func (m *MockTransaction) CreateWorkflowExecution(ctx context.Context, createMode persistence.CreateWorkflowMode, ...) (int64, error)
- func (m *MockTransaction) EXPECT() *MockTransactionMockRecorder
- func (m *MockTransaction) SetWorkflowExecution(ctx context.Context, workflowSnapshot *persistence.WorkflowSnapshot) error
- func (m *MockTransaction) UpdateWorkflowExecution(ctx context.Context, updateMode persistence.UpdateWorkflowMode, ...) (int64, int64, error)
- type MockTransactionMockRecorder
- func (mr *MockTransactionMockRecorder) ConflictResolveWorkflowExecution(...) *gomock.Call
- func (mr *MockTransactionMockRecorder) CreateWorkflowExecution(ctx, createMode, newWorkflowFailoverVersion, newWorkflowSnapshot, ... any) *gomock.Call
- func (mr *MockTransactionMockRecorder) SetWorkflowExecution(ctx, workflowSnapshot any) *gomock.Call
- func (mr *MockTransactionMockRecorder) UpdateWorkflowExecution(...) *gomock.Call
- type MutableStateImpl
- func NewMutableState(shard historyi.ShardContext, eventsCache events.Cache, logger log.Logger, ...) *MutableStateImpl
- func NewMutableStateFromDB(shard historyi.ShardContext, eventsCache events.Cache, logger log.Logger, ...) (*MutableStateImpl, error)
- func NewMutableStateInChain(shardContext historyi.ShardContext, eventsCache events.Cache, ...) (*MutableStateImpl, error)
- func NewSanitizedMutableState(shard historyi.ShardContext, eventsCache events.Cache, logger log.Logger, ...) (*MutableStateImpl, error)
- func TestGlobalMutableState(shard historyi.ShardContext, eventsCache events.Cache, logger log.Logger, ...) *MutableStateImpl
- func TestLocalMutableState(shard historyi.ShardContext, eventsCache events.Cache, ns *namespace.Namespace, ...) *MutableStateImpl
- func (ms *MutableStateImpl) AddActivityTaskCancelRequestedEvent(workflowTaskCompletedEventID int64, scheduledEventID int64, _ string) (*historypb.HistoryEvent, *persistencespb.ActivityInfo, error)
- func (ms *MutableStateImpl) AddActivityTaskCanceledEvent(scheduledEventID int64, startedEventID int64, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddActivityTaskCompletedEvent(scheduledEventID int64, startedEventID int64, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddActivityTaskFailedEvent(scheduledEventID int64, startedEventID int64, failure *failurepb.Failure, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddActivityTaskScheduledEvent(workflowTaskCompletedEventID int64, ...) (*historypb.HistoryEvent, *persistencespb.ActivityInfo, error)
- func (ms *MutableStateImpl) AddActivityTaskStartedEvent(ai *persistencespb.ActivityInfo, scheduledEventID int64, requestID string, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddActivityTaskTimedOutEvent(scheduledEventID int64, startedEventID int64, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddChildWorkflowExecutionCanceledEvent(initiatedID int64, childExecution *commonpb.WorkflowExecution, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddChildWorkflowExecutionCompletedEvent(initiatedID int64, childExecution *commonpb.WorkflowExecution, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddChildWorkflowExecutionFailedEvent(initiatedID int64, childExecution *commonpb.WorkflowExecution, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddChildWorkflowExecutionStartedEvent(execution *commonpb.WorkflowExecution, workflowType *commonpb.WorkflowType, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddChildWorkflowExecutionTerminatedEvent(initiatedID int64, childExecution *commonpb.WorkflowExecution, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddChildWorkflowExecutionTimedOutEvent(initiatedID int64, childExecution *commonpb.WorkflowExecution, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddCompletedWorkflowEvent(workflowTaskCompletedEventID int64, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddContinueAsNewEvent(ctx context.Context, firstEventID int64, workflowTaskCompletedEventID int64, ...) (*historypb.HistoryEvent, historyi.MutableState, error)
- func (ms *MutableStateImpl) AddExternalWorkflowExecutionCancelRequested(initiatedID int64, targetNamespace namespace.Name, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddExternalWorkflowExecutionSignaled(initiatedID int64, targetNamespace namespace.Name, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddFailWorkflowEvent(workflowTaskCompletedEventID int64, retryState enumspb.RetryState, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddFirstWorkflowTaskScheduled(parentClock *clockspb.VectorClock, startEvent *historypb.HistoryEvent, ...) (int64, error)
- func (ms *MutableStateImpl) AddHistoryEvent(t enumspb.EventType, setAttributes func(*historypb.HistoryEvent)) *historypb.HistoryEvent
- func (ms *MutableStateImpl) AddHistorySize(size int64)
- func (ms *MutableStateImpl) AddReapplyCandidateEvent(event *historypb.HistoryEvent)
- func (ms *MutableStateImpl) AddRecordMarkerEvent(workflowTaskCompletedEventID int64, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddRequestCancelExternalWorkflowExecutionFailedEvent(initiatedID int64, targetNamespace namespace.Name, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddRequestCancelExternalWorkflowExecutionInitiatedEvent(workflowTaskCompletedEventID int64, cancelRequestID string, ...) (*historypb.HistoryEvent, *persistencespb.RequestCancelInfo, error)
- func (ms *MutableStateImpl) AddSignalExternalWorkflowExecutionFailedEvent(initiatedID int64, targetNamespace namespace.Name, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddSignalExternalWorkflowExecutionInitiatedEvent(workflowTaskCompletedEventID int64, signalRequestID string, ...) (*historypb.HistoryEvent, *persistencespb.SignalInfo, error)
- func (ms *MutableStateImpl) AddSignalRequested(requestID string)
- func (ms *MutableStateImpl) AddStartChildWorkflowExecutionFailedEvent(initiatedID int64, cause enumspb.StartChildWorkflowExecutionFailedCause, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddStartChildWorkflowExecutionInitiatedEvent(workflowTaskCompletedEventID int64, createRequestID string, ...) (*historypb.HistoryEvent, *persistencespb.ChildExecutionInfo, error)
- func (ms *MutableStateImpl) AddTasks(newTasks ...tasks.Task)
- func (ms *MutableStateImpl) AddTimeoutWorkflowEvent(firstEventID int64, retryState enumspb.RetryState, newExecutionRunID string) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddTimerCanceledEvent(workflowTaskCompletedEventID int64, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddTimerFiredEvent(timerID string) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddTimerStartedEvent(workflowTaskCompletedEventID int64, ...) (*historypb.HistoryEvent, *persistencespb.TimerInfo, error)
- func (ms *MutableStateImpl) AddUpsertWorkflowSearchAttributesEvent(workflowTaskCompletedEventID int64, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowExecutionCancelRequestedEvent(request *historyservice.RequestCancelWorkflowExecutionRequest) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowExecutionCanceledEvent(workflowTaskCompletedEventID int64, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowExecutionOptionsUpdatedEvent(versioningOverride *workflowpb.VersioningOverride, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowExecutionSignaled(signalName string, input *commonpb.Payloads, identity string, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowExecutionSignaledEvent(signalName string, input *commonpb.Payloads, identity string, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowExecutionStartedEvent(execution *commonpb.WorkflowExecution, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowExecutionStartedEventWithOptions(execution *commonpb.WorkflowExecution, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowExecutionTerminatedEvent(firstEventID int64, reason string, details *commonpb.Payloads, identity string, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowExecutionUpdateAcceptedEvent(protocolInstanceID string, acceptedRequestMessageId string, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowExecutionUpdateAdmittedEvent(request *updatepb.Request, origin enumspb.UpdateAdmittedEventOrigin) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowExecutionUpdateCompletedEvent(acceptedEventID int64, updResp *updatepb.Response) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowPropertiesModifiedEvent(workflowTaskCompletedEventID int64, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowTaskCompletedEvent(workflowTask *historyi.WorkflowTaskInfo, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowTaskFailedEvent(workflowTask *historyi.WorkflowTaskInfo, cause enumspb.WorkflowTaskFailedCause, ...) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowTaskScheduleToStartTimeoutEvent(workflowTask *historyi.WorkflowTaskInfo) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) AddWorkflowTaskScheduledEvent(bypassTaskGeneration bool, workflowTaskType enumsspb.WorkflowTaskType) (*historyi.WorkflowTaskInfo, error)
- func (ms *MutableStateImpl) AddWorkflowTaskScheduledEventAsHeartbeat(bypassTaskGeneration bool, originalScheduledTimestamp *timestamppb.Timestamp, ...) (*historyi.WorkflowTaskInfo, error)
- func (ms *MutableStateImpl) AddWorkflowTaskStartedEvent(scheduledEventID int64, requestID string, taskQueue *taskqueuepb.TaskQueue, ...) (*historypb.HistoryEvent, *historyi.WorkflowTaskInfo, error)
- func (ms *MutableStateImpl) AddWorkflowTaskTimedOutEvent(workflowTask *historyi.WorkflowTaskInfo) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) ApplyActivityTaskCancelRequestedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyActivityTaskCanceledEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyActivityTaskCompletedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyActivityTaskFailedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyActivityTaskScheduledEvent(firstEventID int64, event *historypb.HistoryEvent) (*persistencespb.ActivityInfo, error)
- func (ms *MutableStateImpl) ApplyActivityTaskStartedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyActivityTaskTimedOutEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyBuildIdRedirect(startingTaskScheduledEventId int64, buildId string, redirectCounter int64) error
- func (ms *MutableStateImpl) ApplyChildWorkflowExecutionCanceledEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyChildWorkflowExecutionCompletedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyChildWorkflowExecutionFailedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyChildWorkflowExecutionStartedEvent(event *historypb.HistoryEvent, clock *clockspb.VectorClock) error
- func (ms *MutableStateImpl) ApplyChildWorkflowExecutionTerminatedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyChildWorkflowExecutionTimedOutEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyExternalWorkflowExecutionCancelRequested(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyExternalWorkflowExecutionSignaled(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyMutation(mutation *persistencespb.WorkflowMutableStateMutation) error
- func (ms *MutableStateImpl) ApplyRequestCancelExternalWorkflowExecutionFailedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyRequestCancelExternalWorkflowExecutionInitiatedEvent(firstEventID int64, event *historypb.HistoryEvent, cancelRequestID string) (*persistencespb.RequestCancelInfo, error)
- func (ms *MutableStateImpl) ApplySignalExternalWorkflowExecutionFailedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplySignalExternalWorkflowExecutionInitiatedEvent(firstEventID int64, event *historypb.HistoryEvent, signalRequestID string) (*persistencespb.SignalInfo, error)
- func (ms *MutableStateImpl) ApplySnapshot(snapshot *persistencespb.WorkflowMutableState) error
- func (ms *MutableStateImpl) ApplyStartChildWorkflowExecutionFailedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyStartChildWorkflowExecutionInitiatedEvent(firstEventID int64, event *historypb.HistoryEvent, createRequestID string) (*persistencespb.ChildExecutionInfo, error)
- func (ms *MutableStateImpl) ApplyTimerCanceledEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyTimerFiredEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyTimerStartedEvent(event *historypb.HistoryEvent) (*persistencespb.TimerInfo, error)
- func (ms *MutableStateImpl) ApplyTransientWorkflowTaskScheduled() (*historyi.WorkflowTaskInfo, error)
- func (ms *MutableStateImpl) ApplyUpsertWorkflowSearchAttributesEvent(event *historypb.HistoryEvent)
- func (ms *MutableStateImpl) ApplyWorkflowExecutionCancelRequestedEvent(_ *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyWorkflowExecutionCanceledEvent(firstEventID int64, event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyWorkflowExecutionCompletedEvent(firstEventID int64, event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyWorkflowExecutionContinuedAsNewEvent(firstEventID int64, continueAsNewEvent *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyWorkflowExecutionFailedEvent(firstEventID int64, event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyWorkflowExecutionOptionsUpdatedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyWorkflowExecutionSignaled(_ *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyWorkflowExecutionStartedEvent(parentClock *clockspb.VectorClock, execution *commonpb.WorkflowExecution, ...) error
- func (ms *MutableStateImpl) ApplyWorkflowExecutionTerminatedEvent(firstEventID int64, event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyWorkflowExecutionTimedoutEvent(firstEventID int64, event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyWorkflowExecutionUpdateAcceptedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyWorkflowExecutionUpdateAdmittedEvent(event *historypb.HistoryEvent, batchId int64) error
- func (ms *MutableStateImpl) ApplyWorkflowExecutionUpdateCompletedEvent(event *historypb.HistoryEvent, batchID int64) error
- func (ms *MutableStateImpl) ApplyWorkflowPropertiesModifiedEvent(event *historypb.HistoryEvent)
- func (ms *MutableStateImpl) ApplyWorkflowTaskCompletedEvent(event *historypb.HistoryEvent) error
- func (ms *MutableStateImpl) ApplyWorkflowTaskFailedEvent() error
- func (ms *MutableStateImpl) ApplyWorkflowTaskScheduledEvent(version int64, scheduledEventID int64, taskQueue *taskqueuepb.TaskQueue, ...) (*historyi.WorkflowTaskInfo, error)
- func (ms *MutableStateImpl) ApplyWorkflowTaskStartedEvent(workflowTask *historyi.WorkflowTaskInfo, version int64, scheduledEventID int64, ...) (*historyi.WorkflowTaskInfo, error)
- func (ms *MutableStateImpl) ApplyWorkflowTaskTimedOutEvent(timeoutType enumspb.TimeoutType) error
- func (ms *MutableStateImpl) BufferSizeAcceptable() bool
- func (ms *MutableStateImpl) ChasmTree() historyi.ChasmTree
- func (ms *MutableStateImpl) CheckResettable() error
- func (ms *MutableStateImpl) CheckSpeculativeWorkflowTaskTimeoutTask(task *tasks.WorkflowTaskTimeoutTask) bool
- func (ms *MutableStateImpl) ClearStickyTaskQueue()
- func (ms *MutableStateImpl) ClearTransientWorkflowTask() error
- func (ms *MutableStateImpl) CloneToProto() *persistencespb.WorkflowMutableState
- func (ms *MutableStateImpl) CloseTransactionAsMutation(transactionPolicy historyi.TransactionPolicy) (*persistence.WorkflowMutation, []*persistence.WorkflowEvents, error)
- func (ms *MutableStateImpl) CloseTransactionAsSnapshot(transactionPolicy historyi.TransactionPolicy) (*persistence.WorkflowSnapshot, []*persistence.WorkflowEvents, error)
- func (ms *MutableStateImpl) ContinueAsNewMinBackoff(backoffDuration *durationpb.Duration) *durationpb.Duration
- func (ms *MutableStateImpl) CurrentTaskQueue() *taskqueuepb.TaskQueue
- func (ms *MutableStateImpl) CurrentVersionedTransition() *persistencespb.VersionedTransition
- func (ms *MutableStateImpl) DeleteActivity(scheduledEventID int64) error
- func (ms *MutableStateImpl) DeletePendingChildExecution(initiatedEventID int64) error
- func (ms *MutableStateImpl) DeletePendingRequestCancel(initiatedEventID int64) error
- func (ms *MutableStateImpl) DeletePendingSignal(initiatedEventID int64) error
- func (ms *MutableStateImpl) DeleteSignalRequested(requestID string)
- func (ms *MutableStateImpl) DeleteSubStateMachine(path *persistencespb.StateMachinePath) error
- func (ms *MutableStateImpl) DeleteUserTimer(timerID string) error
- func (ms *MutableStateImpl) FlushBufferedEvents()
- func (ms *MutableStateImpl) GenerateMigrationTasks() ([]tasks.Task, int64, error)
- func (ms *MutableStateImpl) GetActivityByActivityID(activityID string) (*persistencespb.ActivityInfo, bool)
- func (ms *MutableStateImpl) GetActivityInfo(scheduledEventID int64) (*persistencespb.ActivityInfo, bool)
- func (ms *MutableStateImpl) GetActivityInfoWithTimerHeartbeat(scheduledEventID int64) (*persistencespb.ActivityInfo, time.Time, bool)
- func (ms *MutableStateImpl) GetActivityScheduledEvent(ctx context.Context, scheduledEventID int64) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) GetActivityType(ctx context.Context, ai *persistencespb.ActivityInfo) (*commonpb.ActivityType, error)
- func (ms *MutableStateImpl) GetApproximatePersistedSize() int
- func (ms *MutableStateImpl) GetAssignedBuildId() string
- func (ms *MutableStateImpl) GetBaseWorkflowInfo() *workflowspb.BaseExecutionInfo
- func (ms *MutableStateImpl) GetChildExecutionInfo(initiatedEventID int64) (*persistencespb.ChildExecutionInfo, bool)
- func (ms *MutableStateImpl) GetChildExecutionInitiatedEvent(ctx context.Context, initiatedEventID int64) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) GetChildrenInitializedPostResetPoint() map[string]*persistencespb.ResetChildInfo
- func (ms *MutableStateImpl) GetCloseVersion() (int64, error)
- func (ms *MutableStateImpl) GetCompletionEvent(ctx context.Context) (event *historypb.HistoryEvent, err error)
- func (ms *MutableStateImpl) GetCronBackoffDuration() time.Duration
- func (ms *MutableStateImpl) GetCurrentBranchToken() ([]byte, error)
- func (ms *MutableStateImpl) GetCurrentVersion() int64
- func (ms *MutableStateImpl) GetDeploymentTransition() *workflowpb.DeploymentTransition
- func (ms *MutableStateImpl) GetEffectiveDeployment() *deploymentpb.Deployment
- func (ms *MutableStateImpl) GetEffectiveVersioningBehavior() enumspb.VersioningBehavior
- func (ms *MutableStateImpl) GetExecutionInfo() *persistencespb.WorkflowExecutionInfo
- func (ms *MutableStateImpl) GetExecutionState() *persistencespb.WorkflowExecutionState
- func (ms *MutableStateImpl) GetFirstRunID(ctx context.Context) (string, error)
- func (ms *MutableStateImpl) GetHSMCompletionCallbackArg(ctx context.Context) (*persistencespb.HSMCompletionCallbackArg, error)
- func (ms *MutableStateImpl) GetHistorySize() int64
- func (ms *MutableStateImpl) GetInheritedBuildId() string
- func (ms *MutableStateImpl) GetLastCompletedWorkflowTaskStartedEventId() int64
- func (ms *MutableStateImpl) GetLastEventVersion() (int64, error)
- func (ms *MutableStateImpl) GetLastFirstEventIDTxnID() (int64, int64)
- func (ms *MutableStateImpl) GetLastWriteVersion() (int64, error)
- func (ms *MutableStateImpl) GetMostRecentWorkerVersionStamp() *commonpb.WorkerVersionStamp
- func (ms *MutableStateImpl) GetNamespaceEntry() *namespace.Namespace
- func (ms *MutableStateImpl) GetNextEventID() int64
- func (ms *MutableStateImpl) GetNexusCompletion(ctx context.Context) (nexus.OperationCompletion, error)
- func (ms *MutableStateImpl) GetPendingActivityInfos() map[int64]*persistencespb.ActivityInfo
- func (ms *MutableStateImpl) GetPendingChildExecutionInfos() map[int64]*persistencespb.ChildExecutionInfo
- func (ms *MutableStateImpl) GetPendingRequestCancelExternalInfos() map[int64]*persistencespb.RequestCancelInfo
- func (ms *MutableStateImpl) GetPendingSignalExternalInfos() map[int64]*persistencespb.SignalInfo
- func (ms *MutableStateImpl) GetPendingSignalRequestedIds() []string
- func (ms *MutableStateImpl) GetPendingTimerInfos() map[string]*persistencespb.TimerInfo
- func (ms *MutableStateImpl) GetPendingWorkflowTask() *historyi.WorkflowTaskInfo
- func (ms *MutableStateImpl) GetQueryRegistry() historyi.QueryRegistry
- func (ms *MutableStateImpl) GetReapplyCandidateEvents() []*historypb.HistoryEvent
- func (ms *MutableStateImpl) GetRequestCancelInfo(initiatedEventID int64) (*persistencespb.RequestCancelInfo, bool)
- func (ms *MutableStateImpl) GetRequesteCancelExternalInitiatedEvent(ctx context.Context, initiatedEventID int64) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) GetRetryBackoffDuration(failure *failurepb.Failure) (time.Duration, enumspb.RetryState)
- func (ms *MutableStateImpl) GetSignalExternalInitiatedEvent(ctx context.Context, initiatedEventID int64) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) GetSignalInfo(initiatedEventID int64) (*persistencespb.SignalInfo, bool)
- func (ms *MutableStateImpl) GetStartEvent(ctx context.Context) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) GetStartVersion() (int64, error)
- func (ms *MutableStateImpl) GetStartedWorkflowTask() *historyi.WorkflowTaskInfo
- func (ms *MutableStateImpl) GetTransientWorkflowTaskInfo(workflowTask *historyi.WorkflowTaskInfo, identity string) *historyspb.TransientWorkflowTaskInfo
- func (ms *MutableStateImpl) GetUpdateCondition() (int64, int64)
- func (ms *MutableStateImpl) GetUpdateOutcome(ctx context.Context, updateID string) (*updatepb.Outcome, error)
- func (ms *MutableStateImpl) GetUserTimerInfo(timerID string) (*persistencespb.TimerInfo, bool)
- func (ms *MutableStateImpl) GetUserTimerInfoByEventID(startEventID int64) (*persistencespb.TimerInfo, bool)
- func (ms *MutableStateImpl) GetWorkerDeploymentSA() string
- func (ms *MutableStateImpl) GetWorkerDeploymentVersionSA() string
- func (ms *MutableStateImpl) GetWorkflowCloseTime(ctx context.Context) (time.Time, error)
- func (ms *MutableStateImpl) GetWorkflowExecutionDuration(ctx context.Context) (time.Duration, error)
- func (ms *MutableStateImpl) GetWorkflowKey() definition.WorkflowKey
- func (ms *MutableStateImpl) GetWorkflowStateStatus() (enumsspb.WorkflowExecutionState, enumspb.WorkflowExecutionStatus)
- func (ms *MutableStateImpl) GetWorkflowTaskByID(scheduledEventID int64) *historyi.WorkflowTaskInfo
- func (ms *MutableStateImpl) GetWorkflowType() *commonpb.WorkflowType
- func (ms *MutableStateImpl) GetWorkflowVersioningBehaviorSA() enumspb.VersioningBehavior
- func (ms *MutableStateImpl) HSM() *hsm.Node
- func (ms *MutableStateImpl) HadOrHasWorkflowTask() bool
- func (ms *MutableStateImpl) HasAnyBufferedEvent(filter historybuilder.BufferedEventFilter) bool
- func (ms *MutableStateImpl) HasBufferedEvents() bool
- func (ms *MutableStateImpl) HasCompletedAnyWorkflowTask() bool
- func (ms *MutableStateImpl) HasParentExecution() bool
- func (ms *MutableStateImpl) HasPendingWorkflowTask() bool
- func (ms *MutableStateImpl) HasStartedWorkflowTask() bool
- func (ms *MutableStateImpl) InitTransitionHistory()
- func (ms *MutableStateImpl) IsCancelRequested() bool
- func (ms *MutableStateImpl) IsCurrentWorkflowGuaranteed() bool
- func (ms *MutableStateImpl) IsDirty() bool
- func (ms *MutableStateImpl) IsResetRun() bool
- func (ms *MutableStateImpl) IsResourceDuplicated(resourceDedupKey definition.DeduplicationID) bool
- func (ms *MutableStateImpl) IsSignalRequested(requestID string) bool
- func (ms *MutableStateImpl) IsStickyTaskQueueSet() bool
- func (ms *MutableStateImpl) IsSubStateMachineDeleted() bool
- func (ms *MutableStateImpl) IsTransientWorkflowTask() bool
- func (ms *MutableStateImpl) IsTransitionHistoryEnabled() bool
- func (ms *MutableStateImpl) IsWorkflowCloseAttempted() bool
- func (ms *MutableStateImpl) IsWorkflowExecutionRunning() bool
- func (ms *MutableStateImpl) IsWorkflowPendingOnWorkflowTaskBackoff() bool
- func (ms *MutableStateImpl) LoadHistoryEvent(ctx context.Context, token []byte) (*historypb.HistoryEvent, error)
- func (ms *MutableStateImpl) NextTransitionCount() int64
- func (ms *MutableStateImpl) PopTasks() map[tasks.Category][]tasks.Task
- func (ms *MutableStateImpl) RecordLastActivityCompleteTime(ai *persistencespb.ActivityInfo)
- func (ms *MutableStateImpl) RefreshExpirationTimeoutTask(ctx context.Context) error
- func (ms *MutableStateImpl) RegenerateActivityRetryTask(ai *persistencespb.ActivityInfo, nextScheduledTime time.Time) error
- func (ms *MutableStateImpl) RejectWorkflowExecutionUpdate(_ string, _ *updatepb.Rejection) error
- func (ms *MutableStateImpl) RemoveSpeculativeWorkflowTaskTimeoutTask()
- func (ms *MutableStateImpl) RetryActivity(ai *persistencespb.ActivityInfo, activityFailure *failurepb.Failure) (enumspb.RetryState, error)
- func (ms *MutableStateImpl) SetBaseWorkflow(baseRunID string, baseRunLowestCommonAncestorEventID int64, ...)
- func (ms *MutableStateImpl) SetChildrenInitializedPostResetPoint(children map[string]*persistencespb.ResetChildInfo)
- func (ms *MutableStateImpl) SetCurrentBranchToken(branchToken []byte) error
- func (ms *MutableStateImpl) SetHistoryBuilder(hBuilder *historybuilder.HistoryBuilder)
- func (ms *MutableStateImpl) SetHistoryTree(executionTimeout *durationpb.Duration, runTimeout *durationpb.Duration, ...) error
- func (ms *MutableStateImpl) SetSpeculativeWorkflowTaskTimeoutTask(task *tasks.WorkflowTaskTimeoutTask) error
- func (ms *MutableStateImpl) SetStickyTaskQueue(name string, scheduleToStartTimeout *durationpb.Duration)
- func (ms *MutableStateImpl) SetUpdateCondition(nextEventIDInDB int64, dbRecordVersion int64)
- func (ms *MutableStateImpl) ShouldResetActivityTimerTaskMask(current, incoming *persistencespb.ActivityInfo) bool
- func (ms *MutableStateImpl) StartDeploymentTransition(deployment *deploymentpb.Deployment) error
- func (ms *MutableStateImpl) StartTransaction(namespaceEntry *namespace.Namespace) (bool, error)
- func (ms *MutableStateImpl) TaskQueueScheduleToStartTimeout(tqName string) (*taskqueuepb.TaskQueue, *durationpb.Duration)
- func (ms *MutableStateImpl) UpdateActivity(scheduledEventId int64, updater historyi.ActivityUpdater) error
- func (ms *MutableStateImpl) UpdateActivityInfo(incomingActivityInfo *historyservice.ActivitySyncInfo, ...) error
- func (ms *MutableStateImpl) UpdateActivityProgress(ai *persistencespb.ActivityInfo, ...)
- func (ms *MutableStateImpl) UpdateActivityTaskStatusWithTimerHeartbeat(scheduleEventID int64, timerTaskStatus int32, ...) error
- func (ms *MutableStateImpl) UpdateBuildIdAssignment(buildId string) error
- func (ms *MutableStateImpl) UpdateCurrentVersion(version int64, forceUpdate bool) error
- func (ms *MutableStateImpl) UpdateDuplicatedResource(resourceDedupKey definition.DeduplicationID)
- func (ms *MutableStateImpl) UpdateResetRunID(runID string)
- func (ms *MutableStateImpl) UpdateUserTimer(ti *persistencespb.TimerInfo) error
- func (ms *MutableStateImpl) UpdateUserTimerTaskStatus(timerID string, status int64) error
- func (ms *MutableStateImpl) UpdateWorkflowStateStatus(state enumsspb.WorkflowExecutionState, status enumspb.WorkflowExecutionStatus) error
- func (ms *MutableStateImpl) VisitUpdates(visitor func(updID string, updInfo *persistencespb.UpdateInfo))
- type MutableStateRebuilder
- type MutableStateRebuilderImpl
- type MutableStateWithEffects
- type RelocatableAttributes
- type RelocatableAttributesFetcher
- type TaskGenerator
- type TaskGeneratorImpl
- func (r *TaskGeneratorImpl) GenerateActivityRetryTasks(activityInfo *persistencespb.ActivityInfo) error
- func (r *TaskGeneratorImpl) GenerateActivityTasks(activityScheduledEventID int64) error
- func (r *TaskGeneratorImpl) GenerateActivityTimerTasks() error
- func (r *TaskGeneratorImpl) GenerateChildWorkflowTasks(event *historypb.HistoryEvent) error
- func (r *TaskGeneratorImpl) GenerateDelayedWorkflowTasks(startEvent *historypb.HistoryEvent) error
- func (r *TaskGeneratorImpl) GenerateDeleteExecutionTask() (*tasks.DeleteExecutionTask, error)
- func (r *TaskGeneratorImpl) GenerateDeleteHistoryEventTask(closeTime time.Time) error
- func (r *TaskGeneratorImpl) GenerateDirtySubStateMachineTasks(stateMachineRegistry *hsm.Registry) error
- func (r *TaskGeneratorImpl) GenerateHistoryReplicationTasks(eventBatches [][]*historypb.HistoryEvent) ([]tasks.Task, error)
- func (r *TaskGeneratorImpl) GenerateMigrationTasks() ([]tasks.Task, int64, error)
- func (r *TaskGeneratorImpl) GenerateRecordWorkflowStartedTasks(startEvent *historypb.HistoryEvent) error
- func (r *TaskGeneratorImpl) GenerateRequestCancelExternalTasks(event *historypb.HistoryEvent) error
- func (r *TaskGeneratorImpl) GenerateScheduleSpeculativeWorkflowTaskTasks(workflowTask *historyi.WorkflowTaskInfo) error
- func (r *TaskGeneratorImpl) GenerateScheduleWorkflowTaskTasks(workflowTaskScheduledEventID int64) error
- func (r *TaskGeneratorImpl) GenerateSignalExternalTasks(event *historypb.HistoryEvent) error
- func (r *TaskGeneratorImpl) GenerateStartWorkflowTaskTasks(workflowTaskScheduledEventID int64) error
- func (r *TaskGeneratorImpl) GenerateUpsertVisibilityTask() error
- func (r *TaskGeneratorImpl) GenerateUserTimerTasks() error
- func (r *TaskGeneratorImpl) GenerateWorkflowCloseTasks(closedTime time.Time, deleteAfterClose bool) error
- func (r *TaskGeneratorImpl) GenerateWorkflowResetTasks() error
- func (r *TaskGeneratorImpl) GenerateWorkflowStartTasks(startEvent *historypb.HistoryEvent) (int32, error)
- type TaskGeneratorProvider
- type TaskRefresher
- type TaskRefresherImpl
- type TimerSequence
- type TimerSequenceID
- type TimerSequenceIDs
- type Transaction
- type TransactionImpl
- func (t *TransactionImpl) ConflictResolveWorkflowExecution(ctx context.Context, ...) (int64, int64, int64, error)
- func (t *TransactionImpl) CreateWorkflowExecution(ctx context.Context, createMode persistence.CreateWorkflowMode, ...) (int64, error)
- func (t *TransactionImpl) SetWorkflowExecution(ctx context.Context, workflowSnapshot *persistence.WorkflowSnapshot) error
- func (t *TransactionImpl) UpdateWorkflowExecution(ctx context.Context, updateMode persistence.UpdateWorkflowMode, ...) (int64, int64, error)
Constants ¶
const ( QueryCompletionTypeSucceeded historyi.QueryCompletionType = iota QueryCompletionTypeUnblocked QueryCompletionTypeFailed )
const ( TimerTaskStatusNone = iota TimerTaskStatusCreated )
const ( TimerTaskStatusCreatedStartToClose = 1 << iota TimerTaskStatusCreatedScheduleToStart TimerTaskStatusCreatedScheduleToClose TimerTaskStatusCreatedHeartbeat )
const (
// ErrMessageHistorySizeZero indicate that history is empty
ErrMessageHistorySizeZero = "encounter history size being zero"
)
const (
// Mutable state is a top-level state machine in the state machines framework.
StateMachineType = "workflow.MutableState"
)
Variables ¶
var ( // ErrWorkflowFinished indicates trying to mutate mutable state after workflow finished ErrWorkflowFinished = serviceerror.NewInternal("invalid mutable state action: mutation after finish") // ErrMissingTimerInfo indicates missing timer info ErrMissingTimerInfo = serviceerror.NewInternal("unable to get timer info") // ErrMissingActivityInfo indicates missing activity info ErrMissingActivityInfo = serviceerror.NewInternal("unable to get activity info") // ErrMissingChildWorkflowInfo indicates missing child workflow info ErrMissingChildWorkflowInfo = serviceerror.NewInternal("unable to get child workflow info") // ErrMissingRequestCancelInfo indicates missing request cancel info ErrMissingRequestCancelInfo = serviceerror.NewInternal("unable to get request cancel info") // ErrMissingSignalInfo indicates missing signal external ErrMissingSignalInfo = serviceerror.NewInternal("unable to get signal info") // ErrMissingWorkflowStartEvent indicates missing workflow start event ErrMissingWorkflowStartEvent = serviceerror.NewInternal("unable to get workflow start event") // ErrMissingWorkflowCompletionEvent indicates missing workflow completion event ErrMissingWorkflowCompletionEvent = serviceerror.NewInternal("unable to get workflow completion event") // ErrMissingActivityScheduledEvent indicates missing workflow activity scheduled event ErrMissingActivityScheduledEvent = serviceerror.NewInternal("unable to get activity scheduled event") // ErrMissingChildWorkflowInitiatedEvent indicates missing child workflow initiated event ErrMissingChildWorkflowInitiatedEvent = serviceerror.NewInternal("unable to get child workflow initiated event") // ErrMissingSignalInitiatedEvent indicates missing workflow signal initiated event ErrMissingSignalInitiatedEvent = serviceerror.NewInternal("unable to get signal initiated event") // ErrPinnedWorkflowCannotTransition indicates attempt to start a transition on a pinned workflow ErrPinnedWorkflowCannotTransition = serviceerror.NewInternal("unable to start transition on pinned workflows") )
var ( // EmptyVersionedTransition is the zero value for VersionedTransition. // It's not a valid versioned transition for a workflow, and should only // be used for representing the absence of a versioned transition. // EmptyVersionedTransition is also considered less than any non-empty versioned transition. EmptyVersionedTransition = &persistencespb.VersionedTransition{ NamespaceFailoverVersion: common.EmptyVersion, TransitionCount: 0, } )
var ErrDuplicateRegistration = errors.New("duplicate registration")
ErrDuplicateRegistration is returned by a CommandHandlerRegistry when it detects duplicate registration.
var Module = fx.Options( fx.Provide(func() TaskGeneratorProvider { return defaultTaskGeneratorProvider }), fx.Invoke(populateTaskGeneratorProvider), fx.Provide(RelocatableAttributesFetcherProvider), fx.Invoke(RegisterStateMachine), )
Functions ¶
func ActivityMatchWorkflowRules ¶
func ActivityMatchWorkflowRules( ms historyi.MutableState, timeSource clock.TimeSource, logger log.Logger, ai *persistencespb.ActivityInfo) bool
ActivityMatchWorkflowRules checks if the activity matches any of the workflow rules and takes action based on the matched rule. If activity is changed in the result, it should be updated in the mutable state. In this case this function return true. If activity was not changed it will return false.
func AddNextStateMachineTimerTask ¶ added in v1.25.0
func AddNextStateMachineTimerTask(ms historyi.MutableState)
AddNextStateMachineTimerTask generates a state machine timer task if the first deadline doesn't have a task scheduled yet.
func ExponentialBackoffAlgorithm ¶ added in v1.24.0
func FindAutoResetPoint ¶
func FindAutoResetPoint( timeSource clock.TimeSource, verifyChecksum func(string) error, autoResetPoints *workflowpb.ResetPoints, ) (string, *workflowpb.ResetPointInfo)
FindAutoResetPoint returns the auto reset point
func GetActivityState ¶ added in v1.26.2
func GetActivityState(ai *persistencespb.ActivityInfo) enumspb.PendingActivityState
func GetEffectiveDeployment ¶ added in v1.26.2
func GetEffectiveDeployment(versioningInfo *workflowpb.WorkflowExecutionVersioningInfo) *deploymentpb.Deployment
GetEffectiveDeployment returns the effective deployment in the following order:
- DeploymentVersionTransition.Deployment: this is returned when the wf is transitioning to a new deployment
- VersioningOverride.Deployment: this is returned when user has set a PINNED override at wf start time, or later via UpdateWorkflowExecutionOptions.
- Deployment: this is returned when there is no transition and no override (the most common case). Deployment is set based on the worker-sent deployment in the latest WFT completion. Exception: if Deployment is set but the workflow's effective behavior is UNSPECIFIED, it means the workflow is unversioned, so effective deployment will be nil.
Note: Deployment objects are immutable, never change their fields.
func GetEffectiveVersioningBehavior ¶ added in v1.26.2
func GetEffectiveVersioningBehavior(versioningInfo *workflowpb.WorkflowExecutionVersioningInfo) enumspb.VersioningBehavior
GetEffectiveVersioningBehavior returns the effective versioning behavior in the following order:
- VersioningOverride.Behavior: this is returned when user has set a behavior override at wf start time, or later via UpdateWorkflowExecutionOptions.
- Behavior: this is returned when there is no override (most common case). Behavior is set based on the worker-sent deployment in the latest WFT completion.
func GetNextScheduledTime ¶ added in v1.26.2
func GetNextScheduledTime(ai *persistencespb.ActivityInfo) time.Time
func GetPendingActivityInfo ¶ added in v1.26.2
func GetPendingActivityInfo( ctx context.Context, shardContext historyi.ShardContext, mutableState historyi.MutableState, ai *persistencespb.ActivityInfo, ) (*workflowpb.PendingActivityInfo, error)
func GetPerTaskQueueFamilyScope ¶ added in v1.25.0
func MatchWorkflowRule ¶
func MatchWorkflowRule( executionInfo *persistencespb.WorkflowExecutionInfo, executionState *persistencespb.WorkflowExecutionState, ai *persistencespb.ActivityInfo, rule *rulespb.WorkflowRuleSpec, ) (bool, error)
func MutableStateFailoverVersion ¶ added in v1.20.0
func MutableStateFailoverVersion( mutableState historyi.MutableState, ) *int64
func NewMapEventCache ¶ added in v1.21.0
NewMapEventCache is a functional event cache mock that wraps a simple Go map
func NewQueryRegistry ¶
func NewQueryRegistry() historyi.QueryRegistry
func NewTimerSequence ¶
func NewTimerSequence( mutableState historyi.MutableState, ) *timerSequenceImpl
func NotifyNewHistoryMutationEvent ¶ added in v1.12.0
func NotifyNewHistoryMutationEvent( engine historyi.Engine, workflowMutation *persistence.WorkflowMutation, ) error
func NotifyNewHistorySnapshotEvent ¶ added in v1.12.0
func NotifyNewHistorySnapshotEvent( engine historyi.Engine, workflowSnapshot *persistence.WorkflowSnapshot, ) error
func NotifyWorkflowMutationTasks ¶ added in v1.12.0
func NotifyWorkflowMutationTasks( engine historyi.Engine, workflowMutation *persistence.WorkflowMutation, )
func NotifyWorkflowSnapshotTasks ¶ added in v1.12.0
func NotifyWorkflowSnapshotTasks( engine historyi.Engine, workflowSnapshot *persistence.WorkflowSnapshot, )
func PauseActivity ¶ added in v1.27.0
func PauseActivity( mutableState historyi.MutableState, activityId string, pauseInfo *persistencespb.ActivityInfo_PauseInfo, ) error
func PersistWorkflowEvents ¶ added in v1.12.0
func PersistWorkflowEvents( ctx context.Context, shardContext historyi.ShardContext, workflowEventsSlice ...*persistence.WorkflowEvents, ) (int64, error)
func RefreshTasksForWorkflowStart ¶ added in v1.25.0
func RefreshTasksForWorkflowStart( ctx context.Context, mutableState historyi.MutableState, taskGenerator TaskGenerator, minVersionedTransition *persistencespb.VersionedTransition, ) error
func RegisterStateMachine ¶ added in v1.24.0
func ResetActivity ¶ added in v1.27.0
func ResetActivity( shardContext historyi.ShardContext, mutableState historyi.MutableState, activityId string, resetHeartbeats bool, keepPaused bool, jitter time.Duration, ) error
func SanitizeMutableState ¶ added in v1.25.0
func SanitizeMutableState( workflowMutableState *persistencespb.WorkflowMutableState, )
func SanitizeMutableStateMutation ¶
func SanitizeMutableStateMutation( mutableStateMutation *persistencespb.WorkflowMutableStateMutation, )
func SanitizeStateMachineNode ¶ added in v1.25.0
func SanitizeStateMachineNode( node *persistencespb.StateMachineNode, )
func ScheduleWorkflowTask ¶
func ScheduleWorkflowTask( mutableState historyi.MutableState, ) error
func SetupNewWorkflowForRetryOrCron ¶ added in v1.13.0
func SetupNewWorkflowForRetryOrCron( ctx context.Context, previousMutableState historyi.MutableState, newMutableState historyi.MutableState, newRunID string, startAttr *historypb.WorkflowExecutionStartedEventAttributes, startLinks []*commonpb.Link, lastCompletionResult *commonpb.Payloads, failure *failurepb.Failure, backoffInterval time.Duration, initiator enumspb.ContinueAsNewInitiator, ) error
func TerminateWorkflow ¶
func TerminateWorkflow( mutableState historyi.MutableState, terminateReason string, terminateDetails *commonpb.Payloads, terminateIdentity string, deleteAfterTerminate bool, links []*commonpb.Link, ) error
TerminateWorkflow will write a WorkflowExecutionTerminated event with a fresh batch ID. Do not use for situations where the WorkflowExecutionTerminated event must fall within an existing event batch (for example, if you've already failed a workflow task via `failWorkflowTask` and have an event batch ID).
func TestCloneToProto ¶
func TestCloneToProto( mutableState historyi.MutableState, ) *persistencespb.WorkflowMutableState
func TimeoutWorkflow ¶
func TimeoutWorkflow( mutableState historyi.MutableState, retryState enumspb.RetryState, continuedRunID string, ) error
func TrackStateMachineTimer ¶ added in v1.25.0
func TrackStateMachineTimer(ms historyi.MutableState, deadline time.Time, taskInfo *persistencespb.StateMachineTaskInfo)
TrackStateMachineTimer tracks a timer task in the mutable state's StateMachineTimers slice sorted and grouped by deadline. Only a single task for a given type can be tracked for a given machine. If a task of the same type is already tracked, it will be overridden.
func TransitionHistoryStalenessCheck ¶ added in v1.24.0
func TransitionHistoryStalenessCheck( history []*persistencespb.VersionedTransition, refVersionedTransition *persistencespb.VersionedTransition, ) error
TransitionHistoryStalenessCheck verifies that ref namespace failover version and transition count is contained in the given transition history.
When a task or API request is being processed, the history is compared with the imprinted state reference to verify that the state is not stale or that the task/request itself is not stale. For example, if the state has a history of `[{v: 1, t: 3}, {v: 2, t: 5}]`, task A `{v: 2, t: 4}` **is not** referencing stale state because for version `2` transitions `4-5` are valid, while task B `{v: 2, t: 6}` **is** referencing stale state because the transition count is out of range for version `2`. Furthermore, task C `{v: 1, t: 4}` itself is stale because it is referencing an impossible state, likely due to post split-brain reconciliation. NOTE: This function should only be used when there is reloading logic on top of it, since the error returned is a terminal error.
func TrimStateMachineTimers ¶ added in v1.25.0
func TrimStateMachineTimers( mutableState historyi.MutableState, minVersionedTransition *persistencespb.VersionedTransition, ) error
TrimStateMachineTimers returns of copy of trimmed the StateMachineTimers slice by removing any timer tasks that are associated with an HSM node that has been deleted or updated on or after the provided minVersionedTransition.
func UnpauseActivity ¶ added in v1.27.0
func UnpauseActivity( shardContext historyi.ShardContext, mutableState historyi.MutableState, ai *persistencespb.ActivityInfo, resetAttempts bool, resetHeartbeat bool, jitter time.Duration, ) error
func UnpauseActivityWithReset ¶ added in v1.26.2
func UnpauseActivityWithReset( shardContext historyi.ShardContext, mutableState historyi.MutableState, ai *persistencespb.ActivityInfo, scheduleNewRun bool, resetHeartbeats bool, jitter time.Duration, ) (*historyservice.UnpauseActivityResponse, error)
func UnpauseActivityWithResume ¶ added in v1.26.2
func UnpauseActivityWithResume( shardContext historyi.ShardContext, mutableState historyi.MutableState, ai *persistencespb.ActivityInfo, scheduleNewRun bool, jitter time.Duration, ) (*historyservice.UnpauseActivityResponse, error)
func UpdateActivityInfoForRetries ¶ added in v1.26.2
func UpdateActivityInfoForRetries( ai *persistencespb.ActivityInfo, version int64, attempt int32, failure *failurepb.Failure, nextScheduledTime *timestamppb.Timestamp, ) *persistencespb.ActivityInfo
func UpdatedTransitionHistory ¶ added in v1.24.0
func UpdatedTransitionHistory( history []*persistencespb.VersionedTransition, namespaceFailoverVersion int64, ) []*persistencespb.VersionedTransition
UpdatedTransitionHistory takes a slice of transition history and returns a new slice that includes the max state transition count for the given version. If the given version is the version of the last history item, that item will be replaced in the returned slice with an item containing the modified transition count. Does not modify the history slice in place.
Types ¶
type BackoffCalculatorAlgorithmFunc ¶ added in v1.24.0
type CommandHandler ¶ added in v1.24.0
type CommandHandler func( context.Context, historyi.MutableState, CommandValidator, int64, *commandpb.Command, ) error
CommandHandler is a function for handling a workflow command as part of processing a RespondWorkflowTaskCompleted worker request.
type CommandHandlerRegistry ¶ added in v1.24.0
type CommandHandlerRegistry struct {
// contains filtered or unexported fields
}
CommandHandlerRegistry maintains a mapping of command type to CommandHandler.
func NewCommandHandlerRegistry ¶ added in v1.24.0
func NewCommandHandlerRegistry() *CommandHandlerRegistry
NewCommandHandlerRegistry creates a new CommandHandlerRegistry.
func (*CommandHandlerRegistry) Handler ¶ added in v1.24.0
func (r *CommandHandlerRegistry) Handler(t enumspb.CommandType) (handler CommandHandler, ok bool)
Handler returns a CommandHandler for a given type and a boolean indicating whether it was found.
func (*CommandHandlerRegistry) Register ¶ added in v1.24.0
func (r *CommandHandlerRegistry) Register(t enumspb.CommandType, handler CommandHandler) error
Register registers a CommandHandler for a given command type. Returns an ErrDuplicateRegistration if a handler for the given command is already registered. All registration is expected to happen in a single thread on process initialization.
type CommandValidator ¶ added in v1.24.0
type CommandValidator interface { // IsValidPayloadSize validates that a payload size is within the configured limits. IsValidPayloadSize(size int) bool }
CommandValidator is a helper for validating workflow commands.
type ContextImpl ¶
type ContextImpl struct { MutableState historyi.MutableState // contains filtered or unexported fields }
func NewContext ¶
func NewContext( config *configs.Config, workflowKey definition.WorkflowKey, logger log.Logger, throttledLogger log.ThrottledLogger, metricsHandler metrics.Handler, ) *ContextImpl
func (*ContextImpl) CacheSize ¶ added in v1.24.0
func (c *ContextImpl) CacheSize() int
CacheSize estimates the in-memory size of the object for cache limits. For proto objects, it uses proto.Size() which returns the serialized size. Note: In-memory size will be slightly larger than the serialized size.
func (*ContextImpl) Clear ¶
func (c *ContextImpl) Clear()
func (*ContextImpl) ConflictResolveWorkflowExecution ¶
func (c *ContextImpl) ConflictResolveWorkflowExecution( ctx context.Context, shardContext historyi.ShardContext, conflictResolveMode persistence.ConflictResolveWorkflowMode, resetMutableState historyi.MutableState, newContext historyi.WorkflowContext, newMutableState historyi.MutableState, currentContext historyi.WorkflowContext, currentMutableState historyi.MutableState, resetWorkflowTransactionPolicy historyi.TransactionPolicy, newWorkflowTransactionPolicy *historyi.TransactionPolicy, currentTransactionPolicy *historyi.TransactionPolicy, ) (retError error)
func (*ContextImpl) CreateWorkflowExecution ¶
func (c *ContextImpl) CreateWorkflowExecution( ctx context.Context, shardContext historyi.ShardContext, createMode persistence.CreateWorkflowMode, prevRunID string, prevLastWriteVersion int64, newMutableState historyi.MutableState, newWorkflow *persistence.WorkflowSnapshot, newWorkflowEvents []*persistence.WorkflowEvents, ) (retError error)
func (*ContextImpl) GetNamespace ¶
func (c *ContextImpl) GetNamespace(shardContext historyi.ShardContext) namespace.Name
func (*ContextImpl) GetWorkflowKey ¶ added in v1.19.0
func (c *ContextImpl) GetWorkflowKey() definition.WorkflowKey
func (*ContextImpl) IsDirty ¶ added in v1.22.0
func (c *ContextImpl) IsDirty() bool
func (*ContextImpl) LoadExecutionStats ¶
func (c *ContextImpl) LoadExecutionStats(ctx context.Context, shardContext historyi.ShardContext) (*persistencespb.ExecutionStats, error)
func (*ContextImpl) LoadMutableState ¶ added in v1.18.0
func (c *ContextImpl) LoadMutableState(ctx context.Context, shardContext historyi.ShardContext) (historyi.MutableState, error)
func (*ContextImpl) PersistWorkflowEvents ¶ added in v1.12.0
func (c *ContextImpl) PersistWorkflowEvents( ctx context.Context, shardContext historyi.ShardContext, workflowEventsSlice ...*persistence.WorkflowEvents, ) (int64, error)
func (*ContextImpl) ReapplyEvents ¶
func (c *ContextImpl) ReapplyEvents( ctx context.Context, shardContext historyi.ShardContext, eventBatches []*persistence.WorkflowEvents, ) error
func (*ContextImpl) RefreshTasks ¶ added in v1.25.0
func (c *ContextImpl) RefreshTasks( ctx context.Context, shardContext historyi.ShardContext, ) error
func (*ContextImpl) SetWorkflowExecution ¶ added in v1.16.0
func (c *ContextImpl) SetWorkflowExecution( ctx context.Context, shardContext historyi.ShardContext, ) (retError error)
func (*ContextImpl) SubmitClosedWorkflowSnapshot ¶ added in v1.24.0
func (c *ContextImpl) SubmitClosedWorkflowSnapshot( ctx context.Context, shardContext historyi.ShardContext, transactionPolicy historyi.TransactionPolicy, ) (retError error)
func (*ContextImpl) Unlock ¶
func (c *ContextImpl) Unlock()
func (*ContextImpl) UpdateRegistry ¶ added in v1.21.0
func (c *ContextImpl) UpdateRegistry(ctx context.Context) update.Registry
func (*ContextImpl) UpdateWorkflowExecutionAsActive ¶
func (c *ContextImpl) UpdateWorkflowExecutionAsActive( ctx context.Context, shardContext historyi.ShardContext, ) error
func (*ContextImpl) UpdateWorkflowExecutionAsPassive ¶
func (c *ContextImpl) UpdateWorkflowExecutionAsPassive( ctx context.Context, shardContext historyi.ShardContext, ) error
func (*ContextImpl) UpdateWorkflowExecutionWithNew ¶
func (c *ContextImpl) UpdateWorkflowExecutionWithNew( ctx context.Context, shardContext historyi.ShardContext, updateMode persistence.UpdateWorkflowMode, newContext historyi.WorkflowContext, newMutableState historyi.MutableState, updateWorkflowTransactionPolicy historyi.TransactionPolicy, newWorkflowTransactionPolicy *historyi.TransactionPolicy, ) (retError error)
func (*ContextImpl) UpdateWorkflowExecutionWithNewAsActive ¶
func (c *ContextImpl) UpdateWorkflowExecutionWithNewAsActive( ctx context.Context, shardContext historyi.ShardContext, newContext historyi.WorkflowContext, newMutableState historyi.MutableState, ) error
func (*ContextImpl) UpdateWorkflowExecutionWithNewAsPassive ¶
func (c *ContextImpl) UpdateWorkflowExecutionWithNewAsPassive( ctx context.Context, shardContext historyi.ShardContext, newContext historyi.WorkflowContext, newMutableState historyi.MutableState, ) error
type FailWorkflowTaskError ¶ added in v1.24.0
type FailWorkflowTaskError struct { // The cause to set on the WorkflowTaskFailed event. Cause enumspb.WorkflowTaskFailedCause Message string TerminateWorkflow bool }
FailWorkflowTaskError is an error that can be returned from a CommandHandler to fail the current workflow task and optionally terminate the entire workflow.
func (FailWorkflowTaskError) Error ¶ added in v1.24.0
func (e FailWorkflowTaskError) Error() string
type MockMutableStateRebuilder ¶
type MockMutableStateRebuilder struct {
// contains filtered or unexported fields
}
MockMutableStateRebuilder is a mock of MutableStateRebuilder interface.
func NewMockMutableStateRebuilder ¶
func NewMockMutableStateRebuilder(ctrl *gomock.Controller) *MockMutableStateRebuilder
NewMockMutableStateRebuilder creates a new mock instance.
func (*MockMutableStateRebuilder) ApplyEvents ¶
func (m *MockMutableStateRebuilder) ApplyEvents(ctx context.Context, namespaceID namespace.ID, requestID string, execution *common.WorkflowExecution, history [][]*history.HistoryEvent, newRunHistory []*history.HistoryEvent, newRunID string) (interfaces.MutableState, error)
ApplyEvents mocks base method.
func (*MockMutableStateRebuilder) EXPECT ¶
func (m *MockMutableStateRebuilder) EXPECT() *MockMutableStateRebuilderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockMutableStateRebuilderMockRecorder ¶
type MockMutableStateRebuilderMockRecorder struct {
// contains filtered or unexported fields
}
MockMutableStateRebuilderMockRecorder is the mock recorder for MockMutableStateRebuilder.
func (*MockMutableStateRebuilderMockRecorder) ApplyEvents ¶
func (mr *MockMutableStateRebuilderMockRecorder) ApplyEvents(ctx, namespaceID, requestID, execution, history, newRunHistory, newRunID any) *gomock.Call
ApplyEvents indicates an expected call of ApplyEvents.
type MockTaskGenerator ¶
type MockTaskGenerator struct {
// contains filtered or unexported fields
}
MockTaskGenerator is a mock of TaskGenerator interface.
func NewMockTaskGenerator ¶
func NewMockTaskGenerator(ctrl *gomock.Controller) *MockTaskGenerator
NewMockTaskGenerator creates a new mock instance.
func (*MockTaskGenerator) EXPECT ¶
func (m *MockTaskGenerator) EXPECT() *MockTaskGeneratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTaskGenerator) GenerateActivityRetryTasks ¶
func (m *MockTaskGenerator) GenerateActivityRetryTasks(activityInfo *persistence.ActivityInfo) error
GenerateActivityRetryTasks mocks base method.
func (*MockTaskGenerator) GenerateActivityTasks ¶ added in v1.16.0
func (m *MockTaskGenerator) GenerateActivityTasks(activityScheduledEventID int64) error
GenerateActivityTasks mocks base method.
func (*MockTaskGenerator) GenerateActivityTimerTasks ¶
func (m *MockTaskGenerator) GenerateActivityTimerTasks() error
GenerateActivityTimerTasks mocks base method.
func (*MockTaskGenerator) GenerateChildWorkflowTasks ¶
func (m *MockTaskGenerator) GenerateChildWorkflowTasks(event *history.HistoryEvent) error
GenerateChildWorkflowTasks mocks base method.
func (*MockTaskGenerator) GenerateDelayedWorkflowTasks ¶
func (m *MockTaskGenerator) GenerateDelayedWorkflowTasks(startEvent *history.HistoryEvent) error
GenerateDelayedWorkflowTasks mocks base method.
func (*MockTaskGenerator) GenerateDeleteExecutionTask ¶ added in v1.15.0
func (m *MockTaskGenerator) GenerateDeleteExecutionTask() (*tasks.DeleteExecutionTask, error)
GenerateDeleteExecutionTask mocks base method.
func (*MockTaskGenerator) GenerateDeleteHistoryEventTask ¶ added in v1.20.0
func (m *MockTaskGenerator) GenerateDeleteHistoryEventTask(closeTime time.Time) error
GenerateDeleteHistoryEventTask mocks base method.
func (*MockTaskGenerator) GenerateDirtySubStateMachineTasks ¶ added in v1.24.0
func (m *MockTaskGenerator) GenerateDirtySubStateMachineTasks(stateMachineRegistry *hsm.Registry) error
GenerateDirtySubStateMachineTasks mocks base method.
func (*MockTaskGenerator) GenerateHistoryReplicationTasks ¶ added in v1.14.0
func (m *MockTaskGenerator) GenerateHistoryReplicationTasks(eventBatches [][]*history.HistoryEvent) ([]tasks.Task, error)
GenerateHistoryReplicationTasks mocks base method.
func (*MockTaskGenerator) GenerateMigrationTasks ¶ added in v1.17.0
func (m *MockTaskGenerator) GenerateMigrationTasks() ([]tasks.Task, int64, error)
GenerateMigrationTasks mocks base method.
func (*MockTaskGenerator) GenerateRecordWorkflowStartedTasks ¶
func (m *MockTaskGenerator) GenerateRecordWorkflowStartedTasks(startEvent *history.HistoryEvent) error
GenerateRecordWorkflowStartedTasks mocks base method.
func (*MockTaskGenerator) GenerateRequestCancelExternalTasks ¶
func (m *MockTaskGenerator) GenerateRequestCancelExternalTasks(event *history.HistoryEvent) error
GenerateRequestCancelExternalTasks mocks base method.
func (*MockTaskGenerator) GenerateScheduleSpeculativeWorkflowTaskTasks ¶ added in v1.23.0
func (m *MockTaskGenerator) GenerateScheduleSpeculativeWorkflowTaskTasks(workflowTask *interfaces.WorkflowTaskInfo) error
GenerateScheduleSpeculativeWorkflowTaskTasks mocks base method.
func (*MockTaskGenerator) GenerateScheduleWorkflowTaskTasks ¶
func (m *MockTaskGenerator) GenerateScheduleWorkflowTaskTasks(workflowTaskScheduledEventID int64) error
GenerateScheduleWorkflowTaskTasks mocks base method.
func (*MockTaskGenerator) GenerateSignalExternalTasks ¶
func (m *MockTaskGenerator) GenerateSignalExternalTasks(event *history.HistoryEvent) error
GenerateSignalExternalTasks mocks base method.
func (*MockTaskGenerator) GenerateStartWorkflowTaskTasks ¶
func (m *MockTaskGenerator) GenerateStartWorkflowTaskTasks(workflowTaskScheduledEventID int64) error
GenerateStartWorkflowTaskTasks mocks base method.
func (*MockTaskGenerator) GenerateUpsertVisibilityTask ¶ added in v1.18.0
func (m *MockTaskGenerator) GenerateUpsertVisibilityTask() error
GenerateUpsertVisibilityTask mocks base method.
func (*MockTaskGenerator) GenerateUserTimerTasks ¶
func (m *MockTaskGenerator) GenerateUserTimerTasks() error
GenerateUserTimerTasks mocks base method.
func (*MockTaskGenerator) GenerateWorkflowCloseTasks ¶
func (m *MockTaskGenerator) GenerateWorkflowCloseTasks(closedTime time.Time, deleteAfterClose bool) error
GenerateWorkflowCloseTasks mocks base method.
func (*MockTaskGenerator) GenerateWorkflowResetTasks ¶
func (m *MockTaskGenerator) GenerateWorkflowResetTasks() error
GenerateWorkflowResetTasks mocks base method.
func (*MockTaskGenerator) GenerateWorkflowStartTasks ¶
func (m *MockTaskGenerator) GenerateWorkflowStartTasks(startEvent *history.HistoryEvent) (int32, error)
GenerateWorkflowStartTasks mocks base method.
type MockTaskGeneratorMockRecorder ¶
type MockTaskGeneratorMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskGeneratorMockRecorder is the mock recorder for MockTaskGenerator.
func (*MockTaskGeneratorMockRecorder) GenerateActivityRetryTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateActivityRetryTasks(activityInfo any) *gomock.Call
GenerateActivityRetryTasks indicates an expected call of GenerateActivityRetryTasks.
func (*MockTaskGeneratorMockRecorder) GenerateActivityTasks ¶ added in v1.16.0
func (mr *MockTaskGeneratorMockRecorder) GenerateActivityTasks(activityScheduledEventID any) *gomock.Call
GenerateActivityTasks indicates an expected call of GenerateActivityTasks.
func (*MockTaskGeneratorMockRecorder) GenerateActivityTimerTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateActivityTimerTasks() *gomock.Call
GenerateActivityTimerTasks indicates an expected call of GenerateActivityTimerTasks.
func (*MockTaskGeneratorMockRecorder) GenerateChildWorkflowTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateChildWorkflowTasks(event any) *gomock.Call
GenerateChildWorkflowTasks indicates an expected call of GenerateChildWorkflowTasks.
func (*MockTaskGeneratorMockRecorder) GenerateDelayedWorkflowTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateDelayedWorkflowTasks(startEvent any) *gomock.Call
GenerateDelayedWorkflowTasks indicates an expected call of GenerateDelayedWorkflowTasks.
func (*MockTaskGeneratorMockRecorder) GenerateDeleteExecutionTask ¶ added in v1.15.0
func (mr *MockTaskGeneratorMockRecorder) GenerateDeleteExecutionTask() *gomock.Call
GenerateDeleteExecutionTask indicates an expected call of GenerateDeleteExecutionTask.
func (*MockTaskGeneratorMockRecorder) GenerateDeleteHistoryEventTask ¶ added in v1.20.0
func (mr *MockTaskGeneratorMockRecorder) GenerateDeleteHistoryEventTask(closeTime any) *gomock.Call
GenerateDeleteHistoryEventTask indicates an expected call of GenerateDeleteHistoryEventTask.
func (*MockTaskGeneratorMockRecorder) GenerateDirtySubStateMachineTasks ¶ added in v1.24.0
func (mr *MockTaskGeneratorMockRecorder) GenerateDirtySubStateMachineTasks(stateMachineRegistry any) *gomock.Call
GenerateDirtySubStateMachineTasks indicates an expected call of GenerateDirtySubStateMachineTasks.
func (*MockTaskGeneratorMockRecorder) GenerateHistoryReplicationTasks ¶ added in v1.14.0
func (mr *MockTaskGeneratorMockRecorder) GenerateHistoryReplicationTasks(eventBatches any) *gomock.Call
GenerateHistoryReplicationTasks indicates an expected call of GenerateHistoryReplicationTasks.
func (*MockTaskGeneratorMockRecorder) GenerateMigrationTasks ¶ added in v1.17.0
func (mr *MockTaskGeneratorMockRecorder) GenerateMigrationTasks() *gomock.Call
GenerateMigrationTasks indicates an expected call of GenerateMigrationTasks.
func (*MockTaskGeneratorMockRecorder) GenerateRecordWorkflowStartedTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateRecordWorkflowStartedTasks(startEvent any) *gomock.Call
GenerateRecordWorkflowStartedTasks indicates an expected call of GenerateRecordWorkflowStartedTasks.
func (*MockTaskGeneratorMockRecorder) GenerateRequestCancelExternalTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateRequestCancelExternalTasks(event any) *gomock.Call
GenerateRequestCancelExternalTasks indicates an expected call of GenerateRequestCancelExternalTasks.
func (*MockTaskGeneratorMockRecorder) GenerateScheduleSpeculativeWorkflowTaskTasks ¶ added in v1.23.0
func (mr *MockTaskGeneratorMockRecorder) GenerateScheduleSpeculativeWorkflowTaskTasks(workflowTask any) *gomock.Call
GenerateScheduleSpeculativeWorkflowTaskTasks indicates an expected call of GenerateScheduleSpeculativeWorkflowTaskTasks.
func (*MockTaskGeneratorMockRecorder) GenerateScheduleWorkflowTaskTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateScheduleWorkflowTaskTasks(workflowTaskScheduledEventID any) *gomock.Call
GenerateScheduleWorkflowTaskTasks indicates an expected call of GenerateScheduleWorkflowTaskTasks.
func (*MockTaskGeneratorMockRecorder) GenerateSignalExternalTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateSignalExternalTasks(event any) *gomock.Call
GenerateSignalExternalTasks indicates an expected call of GenerateSignalExternalTasks.
func (*MockTaskGeneratorMockRecorder) GenerateStartWorkflowTaskTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateStartWorkflowTaskTasks(workflowTaskScheduledEventID any) *gomock.Call
GenerateStartWorkflowTaskTasks indicates an expected call of GenerateStartWorkflowTaskTasks.
func (*MockTaskGeneratorMockRecorder) GenerateUpsertVisibilityTask ¶ added in v1.18.0
func (mr *MockTaskGeneratorMockRecorder) GenerateUpsertVisibilityTask() *gomock.Call
GenerateUpsertVisibilityTask indicates an expected call of GenerateUpsertVisibilityTask.
func (*MockTaskGeneratorMockRecorder) GenerateUserTimerTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateUserTimerTasks() *gomock.Call
GenerateUserTimerTasks indicates an expected call of GenerateUserTimerTasks.
func (*MockTaskGeneratorMockRecorder) GenerateWorkflowCloseTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateWorkflowCloseTasks(closedTime, deleteAfterClose any) *gomock.Call
GenerateWorkflowCloseTasks indicates an expected call of GenerateWorkflowCloseTasks.
func (*MockTaskGeneratorMockRecorder) GenerateWorkflowResetTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateWorkflowResetTasks() *gomock.Call
GenerateWorkflowResetTasks indicates an expected call of GenerateWorkflowResetTasks.
func (*MockTaskGeneratorMockRecorder) GenerateWorkflowStartTasks ¶
func (mr *MockTaskGeneratorMockRecorder) GenerateWorkflowStartTasks(startEvent any) *gomock.Call
GenerateWorkflowStartTasks indicates an expected call of GenerateWorkflowStartTasks.
type MockTaskRefresher ¶
type MockTaskRefresher struct {
// contains filtered or unexported fields
}
MockTaskRefresher is a mock of TaskRefresher interface.
func NewMockTaskRefresher ¶
func NewMockTaskRefresher(ctrl *gomock.Controller) *MockTaskRefresher
NewMockTaskRefresher creates a new mock instance.
func (*MockTaskRefresher) EXPECT ¶
func (m *MockTaskRefresher) EXPECT() *MockTaskRefresherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTaskRefresher) PartialRefresh ¶ added in v1.25.0
func (m *MockTaskRefresher) PartialRefresh(ctx context.Context, mutableState interfaces.MutableState, minVersionedTransition *persistence.VersionedTransition) error
PartialRefresh mocks base method.
func (*MockTaskRefresher) Refresh ¶ added in v1.25.0
func (m *MockTaskRefresher) Refresh(ctx context.Context, mutableState interfaces.MutableState) error
Refresh mocks base method.
type MockTaskRefresherMockRecorder ¶
type MockTaskRefresherMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskRefresherMockRecorder is the mock recorder for MockTaskRefresher.
func (*MockTaskRefresherMockRecorder) PartialRefresh ¶ added in v1.25.0
func (mr *MockTaskRefresherMockRecorder) PartialRefresh(ctx, mutableState, minVersionedTransition any) *gomock.Call
PartialRefresh indicates an expected call of PartialRefresh.
type MockTimerSequence ¶
type MockTimerSequence struct {
// contains filtered or unexported fields
}
MockTimerSequence is a mock of TimerSequence interface.
func NewMockTimerSequence ¶
func NewMockTimerSequence(ctrl *gomock.Controller) *MockTimerSequence
NewMockTimerSequence creates a new mock instance.
func (*MockTimerSequence) CreateNextActivityTimer ¶
func (m *MockTimerSequence) CreateNextActivityTimer() (bool, error)
CreateNextActivityTimer mocks base method.
func (*MockTimerSequence) CreateNextUserTimer ¶
func (m *MockTimerSequence) CreateNextUserTimer() (bool, error)
CreateNextUserTimer mocks base method.
func (*MockTimerSequence) EXPECT ¶
func (m *MockTimerSequence) EXPECT() *MockTimerSequenceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTimerSequence) LoadAndSortActivityTimers ¶
func (m *MockTimerSequence) LoadAndSortActivityTimers() []TimerSequenceID
LoadAndSortActivityTimers mocks base method.
func (*MockTimerSequence) LoadAndSortUserTimers ¶
func (m *MockTimerSequence) LoadAndSortUserTimers() []TimerSequenceID
LoadAndSortUserTimers mocks base method.
type MockTimerSequenceMockRecorder ¶
type MockTimerSequenceMockRecorder struct {
// contains filtered or unexported fields
}
MockTimerSequenceMockRecorder is the mock recorder for MockTimerSequence.
func (*MockTimerSequenceMockRecorder) CreateNextActivityTimer ¶
func (mr *MockTimerSequenceMockRecorder) CreateNextActivityTimer() *gomock.Call
CreateNextActivityTimer indicates an expected call of CreateNextActivityTimer.
func (*MockTimerSequenceMockRecorder) CreateNextUserTimer ¶
func (mr *MockTimerSequenceMockRecorder) CreateNextUserTimer() *gomock.Call
CreateNextUserTimer indicates an expected call of CreateNextUserTimer.
func (*MockTimerSequenceMockRecorder) LoadAndSortActivityTimers ¶
func (mr *MockTimerSequenceMockRecorder) LoadAndSortActivityTimers() *gomock.Call
LoadAndSortActivityTimers indicates an expected call of LoadAndSortActivityTimers.
func (*MockTimerSequenceMockRecorder) LoadAndSortUserTimers ¶
func (mr *MockTimerSequenceMockRecorder) LoadAndSortUserTimers() *gomock.Call
LoadAndSortUserTimers indicates an expected call of LoadAndSortUserTimers.
type MockTransaction ¶ added in v1.12.0
type MockTransaction struct {
// contains filtered or unexported fields
}
MockTransaction is a mock of Transaction interface.
func NewMockTransaction ¶ added in v1.12.0
func NewMockTransaction(ctrl *gomock.Controller) *MockTransaction
NewMockTransaction creates a new mock instance.
func (*MockTransaction) ConflictResolveWorkflowExecution ¶ added in v1.12.0
func (m *MockTransaction) ConflictResolveWorkflowExecution(ctx context.Context, conflictResolveMode persistence.ConflictResolveWorkflowMode, resetWorkflowFailoverVersion int64, resetWorkflowSnapshot *persistence.WorkflowSnapshot, resetWorkflowEventsSeq []*persistence.WorkflowEvents, newWorkflowFailoverVersion *int64, newWorkflowSnapshot *persistence.WorkflowSnapshot, newWorkflowEventsSeq []*persistence.WorkflowEvents, currentWorkflowFailoverVersion *int64, currentWorkflowMutation *persistence.WorkflowMutation, currentWorkflowEventsSeq []*persistence.WorkflowEvents) (int64, int64, int64, error)
ConflictResolveWorkflowExecution mocks base method.
func (*MockTransaction) CreateWorkflowExecution ¶ added in v1.12.0
func (m *MockTransaction) CreateWorkflowExecution(ctx context.Context, createMode persistence.CreateWorkflowMode, newWorkflowFailoverVersion int64, newWorkflowSnapshot *persistence.WorkflowSnapshot, newWorkflowEventsSeq []*persistence.WorkflowEvents) (int64, error)
CreateWorkflowExecution mocks base method.
func (*MockTransaction) EXPECT ¶ added in v1.12.0
func (m *MockTransaction) EXPECT() *MockTransactionMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTransaction) SetWorkflowExecution ¶ added in v1.16.0
func (m *MockTransaction) SetWorkflowExecution(ctx context.Context, workflowSnapshot *persistence.WorkflowSnapshot) error
SetWorkflowExecution mocks base method.
func (*MockTransaction) UpdateWorkflowExecution ¶ added in v1.12.0
func (m *MockTransaction) UpdateWorkflowExecution(ctx context.Context, updateMode persistence.UpdateWorkflowMode, currentWorkflowFailoverVersion int64, currentWorkflowMutation *persistence.WorkflowMutation, currentWorkflowEventsSeq []*persistence.WorkflowEvents, newWorkflowFailoverVersion *int64, newWorkflowSnapshot *persistence.WorkflowSnapshot, newWorkflowEventsSeq []*persistence.WorkflowEvents) (int64, int64, error)
UpdateWorkflowExecution mocks base method.
type MockTransactionMockRecorder ¶ added in v1.12.0
type MockTransactionMockRecorder struct {
// contains filtered or unexported fields
}
MockTransactionMockRecorder is the mock recorder for MockTransaction.
func (*MockTransactionMockRecorder) ConflictResolveWorkflowExecution ¶ added in v1.12.0
func (mr *MockTransactionMockRecorder) ConflictResolveWorkflowExecution(ctx, conflictResolveMode, resetWorkflowFailoverVersion, resetWorkflowSnapshot, resetWorkflowEventsSeq, newWorkflowFailoverVersion, newWorkflowSnapshot, newWorkflowEventsSeq, currentWorkflowFailoverVersion, currentWorkflowMutation, currentWorkflowEventsSeq any) *gomock.Call
ConflictResolveWorkflowExecution indicates an expected call of ConflictResolveWorkflowExecution.
func (*MockTransactionMockRecorder) CreateWorkflowExecution ¶ added in v1.12.0
func (mr *MockTransactionMockRecorder) CreateWorkflowExecution(ctx, createMode, newWorkflowFailoverVersion, newWorkflowSnapshot, newWorkflowEventsSeq any) *gomock.Call
CreateWorkflowExecution indicates an expected call of CreateWorkflowExecution.
func (*MockTransactionMockRecorder) SetWorkflowExecution ¶ added in v1.16.0
func (mr *MockTransactionMockRecorder) SetWorkflowExecution(ctx, workflowSnapshot any) *gomock.Call
SetWorkflowExecution indicates an expected call of SetWorkflowExecution.
func (*MockTransactionMockRecorder) UpdateWorkflowExecution ¶ added in v1.12.0
func (mr *MockTransactionMockRecorder) UpdateWorkflowExecution(ctx, updateMode, currentWorkflowFailoverVersion, currentWorkflowMutation, currentWorkflowEventsSeq, newWorkflowFailoverVersion, newWorkflowSnapshot, newWorkflowEventsSeq any) *gomock.Call
UpdateWorkflowExecution indicates an expected call of UpdateWorkflowExecution.
type MutableStateImpl ¶
type MutableStateImpl struct { InsertTasks map[tasks.Category][]tasks.Task QueryRegistry historyi.QueryRegistry // contains filtered or unexported fields }
func NewMutableState ¶
func NewMutableStateFromDB ¶ added in v1.23.0
func NewMutableStateFromDB( shard historyi.ShardContext, eventsCache events.Cache, logger log.Logger, namespaceEntry *namespace.Namespace, dbRecord *persistencespb.WorkflowMutableState, dbRecordVersion int64, ) (*MutableStateImpl, error)
func NewMutableStateInChain ¶ added in v1.24.0
func NewSanitizedMutableState ¶ added in v1.17.0
func NewSanitizedMutableState( shard historyi.ShardContext, eventsCache events.Cache, logger log.Logger, namespaceEntry *namespace.Namespace, mutableStateRecord *persistencespb.WorkflowMutableState, lastFirstEventTxnID int64, lastWriteVersion int64, ) (*MutableStateImpl, error)
func TestGlobalMutableState ¶
func TestGlobalMutableState( shard historyi.ShardContext, eventsCache events.Cache, logger log.Logger, version int64, workflowID string, runID string, ) *MutableStateImpl
func TestLocalMutableState ¶
func (*MutableStateImpl) AddActivityTaskCancelRequestedEvent ¶
func (ms *MutableStateImpl) AddActivityTaskCancelRequestedEvent( workflowTaskCompletedEventID int64, scheduledEventID int64, _ string, ) (*historypb.HistoryEvent, *persistencespb.ActivityInfo, error)
func (*MutableStateImpl) AddActivityTaskCanceledEvent ¶
func (ms *MutableStateImpl) AddActivityTaskCanceledEvent( scheduledEventID int64, startedEventID int64, latestCancelRequestedEventID int64, details *commonpb.Payloads, identity string, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddActivityTaskCompletedEvent ¶
func (ms *MutableStateImpl) AddActivityTaskCompletedEvent( scheduledEventID int64, startedEventID int64, request *workflowservice.RespondActivityTaskCompletedRequest, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddActivityTaskFailedEvent ¶
func (ms *MutableStateImpl) AddActivityTaskFailedEvent( scheduledEventID int64, startedEventID int64, failure *failurepb.Failure, retryState enumspb.RetryState, identity string, versioningStamp *commonpb.WorkerVersionStamp, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddActivityTaskScheduledEvent ¶
func (ms *MutableStateImpl) AddActivityTaskScheduledEvent( workflowTaskCompletedEventID int64, command *commandpb.ScheduleActivityTaskCommandAttributes, bypassTaskGeneration bool, ) (*historypb.HistoryEvent, *persistencespb.ActivityInfo, error)
func (*MutableStateImpl) AddActivityTaskStartedEvent ¶
func (ms *MutableStateImpl) AddActivityTaskStartedEvent( ai *persistencespb.ActivityInfo, scheduledEventID int64, requestID string, identity string, versioningStamp *commonpb.WorkerVersionStamp, deployment *deploymentpb.Deployment, redirectInfo *taskqueuespb.BuildIdRedirectInfo, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddActivityTaskTimedOutEvent ¶
func (ms *MutableStateImpl) AddActivityTaskTimedOutEvent( scheduledEventID int64, startedEventID int64, timeoutFailure *failurepb.Failure, retryState enumspb.RetryState, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddChildWorkflowExecutionCanceledEvent ¶
func (ms *MutableStateImpl) AddChildWorkflowExecutionCanceledEvent( initiatedID int64, childExecution *commonpb.WorkflowExecution, attributes *historypb.WorkflowExecutionCanceledEventAttributes, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddChildWorkflowExecutionCompletedEvent ¶
func (ms *MutableStateImpl) AddChildWorkflowExecutionCompletedEvent( initiatedID int64, childExecution *commonpb.WorkflowExecution, attributes *historypb.WorkflowExecutionCompletedEventAttributes, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddChildWorkflowExecutionFailedEvent ¶
func (ms *MutableStateImpl) AddChildWorkflowExecutionFailedEvent( initiatedID int64, childExecution *commonpb.WorkflowExecution, attributes *historypb.WorkflowExecutionFailedEventAttributes, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddChildWorkflowExecutionStartedEvent ¶
func (ms *MutableStateImpl) AddChildWorkflowExecutionStartedEvent( execution *commonpb.WorkflowExecution, workflowType *commonpb.WorkflowType, initiatedID int64, header *commonpb.Header, clock *clockspb.VectorClock, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddChildWorkflowExecutionTerminatedEvent ¶
func (ms *MutableStateImpl) AddChildWorkflowExecutionTerminatedEvent( initiatedID int64, childExecution *commonpb.WorkflowExecution, _ *historypb.WorkflowExecutionTerminatedEventAttributes, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddChildWorkflowExecutionTimedOutEvent ¶
func (ms *MutableStateImpl) AddChildWorkflowExecutionTimedOutEvent( initiatedID int64, childExecution *commonpb.WorkflowExecution, attributes *historypb.WorkflowExecutionTimedOutEventAttributes, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddCompletedWorkflowEvent ¶
func (ms *MutableStateImpl) AddCompletedWorkflowEvent( workflowTaskCompletedEventID int64, command *commandpb.CompleteWorkflowExecutionCommandAttributes, newExecutionRunID string, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddContinueAsNewEvent ¶
func (ms *MutableStateImpl) AddContinueAsNewEvent( ctx context.Context, firstEventID int64, workflowTaskCompletedEventID int64, parentNamespace namespace.Name, command *commandpb.ContinueAsNewWorkflowExecutionCommandAttributes, ) (*historypb.HistoryEvent, historyi.MutableState, error)
func (*MutableStateImpl) AddExternalWorkflowExecutionCancelRequested ¶
func (*MutableStateImpl) AddExternalWorkflowExecutionSignaled ¶
func (*MutableStateImpl) AddFailWorkflowEvent ¶
func (ms *MutableStateImpl) AddFailWorkflowEvent( workflowTaskCompletedEventID int64, retryState enumspb.RetryState, command *commandpb.FailWorkflowExecutionCommandAttributes, newExecutionRunID string, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddFirstWorkflowTaskScheduled ¶
func (ms *MutableStateImpl) AddFirstWorkflowTaskScheduled( parentClock *clockspb.VectorClock, startEvent *historypb.HistoryEvent, bypassTaskGeneration bool, ) (int64, error)
AddFirstWorkflowTaskScheduled adds the first workflow task scheduled event unless it should be delayed as indicated by the startEvent's FirstWorkflowTaskBackoff. Returns the workflow task's scheduled event ID if a task was scheduled, 0 otherwise.
func (*MutableStateImpl) AddHistoryEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) AddHistoryEvent(t enumspb.EventType, setAttributes func(*historypb.HistoryEvent)) *historypb.HistoryEvent
AddHistoryEvent adds any history event to this workflow execution. The provided setAttributes function should be used to set the attributes on the event.
func (*MutableStateImpl) AddHistorySize ¶ added in v1.21.0
func (ms *MutableStateImpl) AddHistorySize(size int64)
func (*MutableStateImpl) AddReapplyCandidateEvent ¶ added in v1.27.0
func (ms *MutableStateImpl) AddReapplyCandidateEvent(event *historypb.HistoryEvent)
func (*MutableStateImpl) AddRecordMarkerEvent ¶
func (ms *MutableStateImpl) AddRecordMarkerEvent( workflowTaskCompletedEventID int64, command *commandpb.RecordMarkerCommandAttributes, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddRequestCancelExternalWorkflowExecutionFailedEvent ¶
func (ms *MutableStateImpl) AddRequestCancelExternalWorkflowExecutionFailedEvent( initiatedID int64, targetNamespace namespace.Name, targetNamespaceID namespace.ID, workflowID string, runID string, cause enumspb.CancelExternalWorkflowExecutionFailedCause, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddRequestCancelExternalWorkflowExecutionInitiatedEvent ¶
func (ms *MutableStateImpl) AddRequestCancelExternalWorkflowExecutionInitiatedEvent( workflowTaskCompletedEventID int64, cancelRequestID string, command *commandpb.RequestCancelExternalWorkflowExecutionCommandAttributes, targetNamespaceID namespace.ID, ) (*historypb.HistoryEvent, *persistencespb.RequestCancelInfo, error)
func (*MutableStateImpl) AddSignalExternalWorkflowExecutionFailedEvent ¶
func (ms *MutableStateImpl) AddSignalExternalWorkflowExecutionFailedEvent( initiatedID int64, targetNamespace namespace.Name, targetNamespaceID namespace.ID, workflowID string, runID string, control string, cause enumspb.SignalExternalWorkflowExecutionFailedCause, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddSignalExternalWorkflowExecutionInitiatedEvent ¶
func (ms *MutableStateImpl) AddSignalExternalWorkflowExecutionInitiatedEvent( workflowTaskCompletedEventID int64, signalRequestID string, command *commandpb.SignalExternalWorkflowExecutionCommandAttributes, targetNamespaceID namespace.ID, ) (*historypb.HistoryEvent, *persistencespb.SignalInfo, error)
func (*MutableStateImpl) AddSignalRequested ¶
func (ms *MutableStateImpl) AddSignalRequested( requestID string, )
func (*MutableStateImpl) AddStartChildWorkflowExecutionFailedEvent ¶
func (ms *MutableStateImpl) AddStartChildWorkflowExecutionFailedEvent( initiatedID int64, cause enumspb.StartChildWorkflowExecutionFailedCause, initiatedEventAttributes *historypb.StartChildWorkflowExecutionInitiatedEventAttributes, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddStartChildWorkflowExecutionInitiatedEvent ¶
func (ms *MutableStateImpl) AddStartChildWorkflowExecutionInitiatedEvent( workflowTaskCompletedEventID int64, createRequestID string, command *commandpb.StartChildWorkflowExecutionCommandAttributes, targetNamespaceID namespace.ID, ) (*historypb.HistoryEvent, *persistencespb.ChildExecutionInfo, error)
func (*MutableStateImpl) AddTasks ¶ added in v1.16.0
func (ms *MutableStateImpl) AddTasks( newTasks ...tasks.Task, )
func (*MutableStateImpl) AddTimeoutWorkflowEvent ¶
func (ms *MutableStateImpl) AddTimeoutWorkflowEvent( firstEventID int64, retryState enumspb.RetryState, newExecutionRunID string, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddTimerCanceledEvent ¶
func (ms *MutableStateImpl) AddTimerCanceledEvent( workflowTaskCompletedEventID int64, command *commandpb.CancelTimerCommandAttributes, identity string, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddTimerFiredEvent ¶
func (ms *MutableStateImpl) AddTimerFiredEvent( timerID string, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddTimerStartedEvent ¶
func (ms *MutableStateImpl) AddTimerStartedEvent( workflowTaskCompletedEventID int64, command *commandpb.StartTimerCommandAttributes, ) (*historypb.HistoryEvent, *persistencespb.TimerInfo, error)
func (*MutableStateImpl) AddUpsertWorkflowSearchAttributesEvent ¶
func (ms *MutableStateImpl) AddUpsertWorkflowSearchAttributesEvent( workflowTaskCompletedEventID int64, command *commandpb.UpsertWorkflowSearchAttributesCommandAttributes, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowExecutionCancelRequestedEvent ¶
func (ms *MutableStateImpl) AddWorkflowExecutionCancelRequestedEvent( request *historyservice.RequestCancelWorkflowExecutionRequest, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowExecutionCanceledEvent ¶
func (ms *MutableStateImpl) AddWorkflowExecutionCanceledEvent( workflowTaskCompletedEventID int64, command *commandpb.CancelWorkflowExecutionCommandAttributes, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowExecutionOptionsUpdatedEvent ¶ added in v1.26.2
func (ms *MutableStateImpl) AddWorkflowExecutionOptionsUpdatedEvent( versioningOverride *workflowpb.VersioningOverride, unsetVersioningOverride bool, attachRequestID string, attachCompletionCallbacks []*commonpb.Callback, links []*commonpb.Link, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowExecutionSignaled ¶
func (*MutableStateImpl) AddWorkflowExecutionSignaledEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) AddWorkflowExecutionSignaledEvent( signalName string, input *commonpb.Payloads, identity string, header *commonpb.Header, externalWorkflowExecution *commonpb.WorkflowExecution, links []*commonpb.Link, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowExecutionStartedEvent ¶
func (ms *MutableStateImpl) AddWorkflowExecutionStartedEvent( execution *commonpb.WorkflowExecution, startRequest *historyservice.StartWorkflowExecutionRequest, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowExecutionStartedEventWithOptions ¶ added in v1.13.0
func (ms *MutableStateImpl) AddWorkflowExecutionStartedEventWithOptions( execution *commonpb.WorkflowExecution, startRequest *historyservice.StartWorkflowExecutionRequest, resetPoints *workflowpb.ResetPoints, prevRunID string, firstRunID string, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowExecutionTerminatedEvent ¶
func (*MutableStateImpl) AddWorkflowExecutionUpdateAcceptedEvent ¶ added in v1.20.0
func (ms *MutableStateImpl) AddWorkflowExecutionUpdateAcceptedEvent( protocolInstanceID string, acceptedRequestMessageId string, acceptedRequestSequencingEventId int64, acceptedRequest *updatepb.Request, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowExecutionUpdateAdmittedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) AddWorkflowExecutionUpdateAdmittedEvent(request *updatepb.Request, origin enumspb.UpdateAdmittedEventOrigin) (*historypb.HistoryEvent, error)
AddWorkflowExecutionUpdateAdmittedEvent adds a WorkflowExecutionUpdateAdmittedEvent to in-memory history.
func (*MutableStateImpl) AddWorkflowExecutionUpdateCompletedEvent ¶ added in v1.20.0
func (ms *MutableStateImpl) AddWorkflowExecutionUpdateCompletedEvent( acceptedEventID int64, updResp *updatepb.Response, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowPropertiesModifiedEvent ¶ added in v1.18.0
func (ms *MutableStateImpl) AddWorkflowPropertiesModifiedEvent( workflowTaskCompletedEventID int64, command *commandpb.ModifyWorkflowPropertiesCommandAttributes, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowTaskCompletedEvent ¶
func (ms *MutableStateImpl) AddWorkflowTaskCompletedEvent( workflowTask *historyi.WorkflowTaskInfo, request *workflowservice.RespondWorkflowTaskCompletedRequest, limits historyi.WorkflowTaskCompletionLimits, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowTaskFailedEvent ¶
func (ms *MutableStateImpl) AddWorkflowTaskFailedEvent( workflowTask *historyi.WorkflowTaskInfo, cause enumspb.WorkflowTaskFailedCause, failure *failurepb.Failure, identity string, versioningStamp *commonpb.WorkerVersionStamp, binChecksum, baseRunID, newRunID string, forkEventVersion int64, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowTaskScheduleToStartTimeoutEvent ¶
func (ms *MutableStateImpl) AddWorkflowTaskScheduleToStartTimeoutEvent( workflowTask *historyi.WorkflowTaskInfo, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) AddWorkflowTaskScheduledEvent ¶
func (ms *MutableStateImpl) AddWorkflowTaskScheduledEvent( bypassTaskGeneration bool, workflowTaskType enumsspb.WorkflowTaskType, ) (*historyi.WorkflowTaskInfo, error)
func (*MutableStateImpl) AddWorkflowTaskScheduledEventAsHeartbeat ¶
func (ms *MutableStateImpl) AddWorkflowTaskScheduledEventAsHeartbeat( bypassTaskGeneration bool, originalScheduledTimestamp *timestamppb.Timestamp, workflowTaskType enumsspb.WorkflowTaskType, ) (*historyi.WorkflowTaskInfo, error)
AddWorkflowTaskScheduledEventAsHeartbeat is to record the first WorkflowTaskScheduledEvent during workflow task heartbeat.
func (*MutableStateImpl) AddWorkflowTaskStartedEvent ¶
func (ms *MutableStateImpl) AddWorkflowTaskStartedEvent( scheduledEventID int64, requestID string, taskQueue *taskqueuepb.TaskQueue, identity string, versioningStamp *commonpb.WorkerVersionStamp, redirectInfo *taskqueuespb.BuildIdRedirectInfo, updateReg update.Registry, skipVersioningCheck bool, ) (*historypb.HistoryEvent, *historyi.WorkflowTaskInfo, error)
func (*MutableStateImpl) AddWorkflowTaskTimedOutEvent ¶
func (ms *MutableStateImpl) AddWorkflowTaskTimedOutEvent( workflowTask *historyi.WorkflowTaskInfo, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) ApplyActivityTaskCancelRequestedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyActivityTaskCancelRequestedEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyActivityTaskCanceledEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyActivityTaskCanceledEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyActivityTaskCompletedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyActivityTaskCompletedEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyActivityTaskFailedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyActivityTaskFailedEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyActivityTaskScheduledEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyActivityTaskScheduledEvent( firstEventID int64, event *historypb.HistoryEvent, ) (*persistencespb.ActivityInfo, error)
func (*MutableStateImpl) ApplyActivityTaskStartedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyActivityTaskStartedEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyActivityTaskTimedOutEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyActivityTaskTimedOutEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyBuildIdRedirect ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyBuildIdRedirect( startingTaskScheduledEventId int64, buildId string, redirectCounter int64, ) error
ApplyBuildIdRedirect applies possible redirect to mutable state based on versioning stamp of a starting task. If a redirect is applicable, assigned build ID of the wf will be updated and all scheduled but not started tasks will be rescheduled to be put on the matching queue of the right build ID.
func (*MutableStateImpl) ApplyChildWorkflowExecutionCanceledEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyChildWorkflowExecutionCanceledEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyChildWorkflowExecutionCompletedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyChildWorkflowExecutionCompletedEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyChildWorkflowExecutionFailedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyChildWorkflowExecutionFailedEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyChildWorkflowExecutionStartedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyChildWorkflowExecutionStartedEvent( event *historypb.HistoryEvent, clock *clockspb.VectorClock, ) error
func (*MutableStateImpl) ApplyChildWorkflowExecutionTerminatedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyChildWorkflowExecutionTerminatedEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyChildWorkflowExecutionTimedOutEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyChildWorkflowExecutionTimedOutEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyExternalWorkflowExecutionCancelRequested ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyExternalWorkflowExecutionCancelRequested( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyExternalWorkflowExecutionSignaled ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyExternalWorkflowExecutionSignaled( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyMutation ¶ added in v1.26.2
func (ms *MutableStateImpl) ApplyMutation( mutation *persistencespb.WorkflowMutableStateMutation, ) error
func (*MutableStateImpl) ApplyRequestCancelExternalWorkflowExecutionFailedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyRequestCancelExternalWorkflowExecutionFailedEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyRequestCancelExternalWorkflowExecutionInitiatedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyRequestCancelExternalWorkflowExecutionInitiatedEvent( firstEventID int64, event *historypb.HistoryEvent, cancelRequestID string, ) (*persistencespb.RequestCancelInfo, error)
func (*MutableStateImpl) ApplySignalExternalWorkflowExecutionFailedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplySignalExternalWorkflowExecutionFailedEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplySignalExternalWorkflowExecutionInitiatedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplySignalExternalWorkflowExecutionInitiatedEvent( firstEventID int64, event *historypb.HistoryEvent, signalRequestID string, ) (*persistencespb.SignalInfo, error)
func (*MutableStateImpl) ApplySnapshot ¶ added in v1.26.2
func (ms *MutableStateImpl) ApplySnapshot( snapshot *persistencespb.WorkflowMutableState, ) error
func (*MutableStateImpl) ApplyStartChildWorkflowExecutionFailedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyStartChildWorkflowExecutionFailedEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyStartChildWorkflowExecutionInitiatedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyStartChildWorkflowExecutionInitiatedEvent( firstEventID int64, event *historypb.HistoryEvent, createRequestID string, ) (*persistencespb.ChildExecutionInfo, error)
func (*MutableStateImpl) ApplyTimerCanceledEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyTimerCanceledEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyTimerFiredEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyTimerFiredEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyTimerStartedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyTimerStartedEvent( event *historypb.HistoryEvent, ) (*persistencespb.TimerInfo, error)
func (*MutableStateImpl) ApplyTransientWorkflowTaskScheduled ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyTransientWorkflowTaskScheduled() (*historyi.WorkflowTaskInfo, error)
func (*MutableStateImpl) ApplyUpsertWorkflowSearchAttributesEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyUpsertWorkflowSearchAttributesEvent( event *historypb.HistoryEvent, )
func (*MutableStateImpl) ApplyWorkflowExecutionCancelRequestedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowExecutionCancelRequestedEvent( _ *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyWorkflowExecutionCanceledEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowExecutionCanceledEvent( firstEventID int64, event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyWorkflowExecutionCompletedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowExecutionCompletedEvent( firstEventID int64, event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyWorkflowExecutionContinuedAsNewEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowExecutionContinuedAsNewEvent( firstEventID int64, continueAsNewEvent *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyWorkflowExecutionFailedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowExecutionFailedEvent( firstEventID int64, event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyWorkflowExecutionOptionsUpdatedEvent ¶ added in v1.26.2
func (ms *MutableStateImpl) ApplyWorkflowExecutionOptionsUpdatedEvent(event *historypb.HistoryEvent) error
func (*MutableStateImpl) ApplyWorkflowExecutionSignaled ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowExecutionSignaled( _ *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyWorkflowExecutionStartedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowExecutionStartedEvent( parentClock *clockspb.VectorClock, execution *commonpb.WorkflowExecution, requestID string, startEvent *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyWorkflowExecutionTerminatedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowExecutionTerminatedEvent( firstEventID int64, event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyWorkflowExecutionTimedoutEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowExecutionTimedoutEvent( firstEventID int64, event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyWorkflowExecutionUpdateAcceptedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowExecutionUpdateAcceptedEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyWorkflowExecutionUpdateAdmittedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowExecutionUpdateAdmittedEvent(event *historypb.HistoryEvent, batchId int64) error
ApplyWorkflowExecutionUpdateAdmittedEvent applies a WorkflowExecutionUpdateAdmittedEvent to mutable state.
func (*MutableStateImpl) ApplyWorkflowExecutionUpdateCompletedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowExecutionUpdateCompletedEvent( event *historypb.HistoryEvent, batchID int64, ) error
func (*MutableStateImpl) ApplyWorkflowPropertiesModifiedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowPropertiesModifiedEvent( event *historypb.HistoryEvent, )
func (*MutableStateImpl) ApplyWorkflowTaskCompletedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowTaskCompletedEvent( event *historypb.HistoryEvent, ) error
func (*MutableStateImpl) ApplyWorkflowTaskFailedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowTaskFailedEvent() error
func (*MutableStateImpl) ApplyWorkflowTaskScheduledEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowTaskScheduledEvent( version int64, scheduledEventID int64, taskQueue *taskqueuepb.TaskQueue, startToCloseTimeout *durationpb.Duration, attempt int32, scheduleTimestamp *timestamppb.Timestamp, originalScheduledTimestamp *timestamppb.Timestamp, workflowTaskType enumsspb.WorkflowTaskType, ) (*historyi.WorkflowTaskInfo, error)
func (*MutableStateImpl) ApplyWorkflowTaskStartedEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowTaskStartedEvent( workflowTask *historyi.WorkflowTaskInfo, version int64, scheduledEventID int64, startedEventID int64, requestID string, timestamp time.Time, suggestContinueAsNew bool, historySizeBytes int64, versioningStamp *commonpb.WorkerVersionStamp, redirectCounter int64, ) (*historyi.WorkflowTaskInfo, error)
func (*MutableStateImpl) ApplyWorkflowTaskTimedOutEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) ApplyWorkflowTaskTimedOutEvent( timeoutType enumspb.TimeoutType, ) error
func (*MutableStateImpl) BufferSizeAcceptable ¶ added in v1.20.3
func (ms *MutableStateImpl) BufferSizeAcceptable() bool
func (*MutableStateImpl) ChasmTree ¶
func (ms *MutableStateImpl) ChasmTree() historyi.ChasmTree
func (*MutableStateImpl) CheckResettable ¶
func (ms *MutableStateImpl) CheckResettable() error
CheckResettable check if workflow can be reset
func (*MutableStateImpl) CheckSpeculativeWorkflowTaskTimeoutTask ¶ added in v1.21.0
func (ms *MutableStateImpl) CheckSpeculativeWorkflowTaskTimeoutTask( task *tasks.WorkflowTaskTimeoutTask, ) bool
func (*MutableStateImpl) ClearStickyTaskQueue ¶ added in v1.21.0
func (ms *MutableStateImpl) ClearStickyTaskQueue()
func (*MutableStateImpl) ClearTransientWorkflowTask ¶ added in v1.16.3
func (ms *MutableStateImpl) ClearTransientWorkflowTask() error
func (*MutableStateImpl) CloneToProto ¶
func (ms *MutableStateImpl) CloneToProto() *persistencespb.WorkflowMutableState
func (*MutableStateImpl) CloseTransactionAsMutation ¶
func (ms *MutableStateImpl) CloseTransactionAsMutation( transactionPolicy historyi.TransactionPolicy, ) (*persistence.WorkflowMutation, []*persistence.WorkflowEvents, error)
func (*MutableStateImpl) CloseTransactionAsSnapshot ¶
func (ms *MutableStateImpl) CloseTransactionAsSnapshot( transactionPolicy historyi.TransactionPolicy, ) (*persistence.WorkflowSnapshot, []*persistence.WorkflowEvents, error)
func (*MutableStateImpl) ContinueAsNewMinBackoff ¶ added in v1.19.0
func (ms *MutableStateImpl) ContinueAsNewMinBackoff(backoffDuration *durationpb.Duration) *durationpb.Duration
func (*MutableStateImpl) CurrentTaskQueue ¶ added in v1.21.0
func (ms *MutableStateImpl) CurrentTaskQueue() *taskqueuepb.TaskQueue
func (*MutableStateImpl) CurrentVersionedTransition ¶ added in v1.27.0
func (ms *MutableStateImpl) CurrentVersionedTransition() *persistencespb.VersionedTransition
func (*MutableStateImpl) DeleteActivity ¶
func (ms *MutableStateImpl) DeleteActivity( scheduledEventID int64, ) error
DeleteActivity deletes details about an activity.
func (*MutableStateImpl) DeletePendingChildExecution ¶
func (ms *MutableStateImpl) DeletePendingChildExecution( initiatedEventID int64, ) error
DeletePendingChildExecution deletes details about a ChildExecutionInfo.
func (*MutableStateImpl) DeletePendingRequestCancel ¶
func (ms *MutableStateImpl) DeletePendingRequestCancel( initiatedEventID int64, ) error
DeletePendingRequestCancel deletes details about a RequestCancelInfo.
func (*MutableStateImpl) DeletePendingSignal ¶
func (ms *MutableStateImpl) DeletePendingSignal( initiatedEventID int64, ) error
DeletePendingSignal deletes details about a SignalInfo
func (*MutableStateImpl) DeleteSignalRequested ¶
func (ms *MutableStateImpl) DeleteSignalRequested( requestID string, )
func (*MutableStateImpl) DeleteSubStateMachine ¶ added in v1.27.0
func (ms *MutableStateImpl) DeleteSubStateMachine(path *persistencespb.StateMachinePath) error
func (*MutableStateImpl) DeleteUserTimer ¶
func (ms *MutableStateImpl) DeleteUserTimer( timerID string, ) error
DeleteUserTimer deletes an user timer.
func (*MutableStateImpl) FlushBufferedEvents ¶
func (ms *MutableStateImpl) FlushBufferedEvents()
func (*MutableStateImpl) GenerateMigrationTasks ¶ added in v1.17.0
func (ms *MutableStateImpl) GenerateMigrationTasks() ([]tasks.Task, int64, error)
func (*MutableStateImpl) GetActivityByActivityID ¶
func (ms *MutableStateImpl) GetActivityByActivityID( activityID string, ) (*persistencespb.ActivityInfo, bool)
GetActivityByActivityID gives details about an activity that is currently in progress.
func (*MutableStateImpl) GetActivityInfo ¶
func (ms *MutableStateImpl) GetActivityInfo( scheduledEventID int64, ) (*persistencespb.ActivityInfo, bool)
GetActivityInfo gives details about an activity that is currently in progress.
func (*MutableStateImpl) GetActivityInfoWithTimerHeartbeat ¶
func (ms *MutableStateImpl) GetActivityInfoWithTimerHeartbeat( scheduledEventID int64, ) (*persistencespb.ActivityInfo, time.Time, bool)
GetActivityInfoWithTimerHeartbeat gives details about an activity that is currently in progress.
func (*MutableStateImpl) GetActivityScheduledEvent ¶
func (ms *MutableStateImpl) GetActivityScheduledEvent( ctx context.Context, scheduledEventID int64, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) GetActivityType ¶ added in v1.22.0
func (ms *MutableStateImpl) GetActivityType( ctx context.Context, ai *persistencespb.ActivityInfo, ) (*commonpb.ActivityType, error)
GetActivityType gets the ActivityType from ActivityInfo if set, or from the events history otherwise for backwards compatibility.
func (*MutableStateImpl) GetApproximatePersistedSize ¶ added in v1.21.0
func (ms *MutableStateImpl) GetApproximatePersistedSize() int
GetApproximatePersistedSize returns approximate size of in-memory objects that will be written to persistence + size of buffered events in history builder if they will not be flushed
func (*MutableStateImpl) GetAssignedBuildId ¶ added in v1.24.0
func (ms *MutableStateImpl) GetAssignedBuildId() string
func (*MutableStateImpl) GetBaseWorkflowInfo ¶ added in v1.21.0
func (ms *MutableStateImpl) GetBaseWorkflowInfo() *workflowspb.BaseExecutionInfo
func (*MutableStateImpl) GetChildExecutionInfo ¶
func (ms *MutableStateImpl) GetChildExecutionInfo( initiatedEventID int64, ) (*persistencespb.ChildExecutionInfo, bool)
GetChildExecutionInfo gives details about a child execution that is currently in progress.
func (*MutableStateImpl) GetChildExecutionInitiatedEvent ¶
func (ms *MutableStateImpl) GetChildExecutionInitiatedEvent( ctx context.Context, initiatedEventID int64, ) (*historypb.HistoryEvent, error)
GetChildExecutionInitiatedEvent reads out the ChildExecutionInitiatedEvent from mutable state for in-progress child executions
func (*MutableStateImpl) GetChildrenInitializedPostResetPoint ¶ added in v1.27.0
func (ms *MutableStateImpl) GetChildrenInitializedPostResetPoint() map[string]*persistencespb.ResetChildInfo
func (*MutableStateImpl) GetCloseVersion ¶ added in v1.25.0
func (ms *MutableStateImpl) GetCloseVersion() (int64, error)
func (*MutableStateImpl) GetCompletionEvent ¶
func (ms *MutableStateImpl) GetCompletionEvent( ctx context.Context, ) (event *historypb.HistoryEvent, err error)
GetCompletionEvent retrieves the workflow completion event from mutable state
func (*MutableStateImpl) GetCronBackoffDuration ¶
func (ms *MutableStateImpl) GetCronBackoffDuration() time.Duration
func (*MutableStateImpl) GetCurrentBranchToken ¶
func (ms *MutableStateImpl) GetCurrentBranchToken() ([]byte, error)
func (*MutableStateImpl) GetCurrentVersion ¶
func (ms *MutableStateImpl) GetCurrentVersion() int64
func (*MutableStateImpl) GetDeploymentTransition ¶ added in v1.26.2
func (ms *MutableStateImpl) GetDeploymentTransition() *workflowpb.DeploymentTransition
func (*MutableStateImpl) GetEffectiveDeployment ¶ added in v1.26.2
func (ms *MutableStateImpl) GetEffectiveDeployment() *deploymentpb.Deployment
GetEffectiveDeployment returns the effective deployment in the following order:
- DeploymentVersionTransition.Deployment: this is returned when the wf is transitioning to a new deployment
- VersioningOverride.Deployment: this is returned when user has set a PINNED override at wf start time, or later via UpdateWorkflowExecutionOptions.
- Deployment: this is returned when there is no transition and no override (the most common case). Deployment is set based on the worker-sent deployment in the latest WFT completion. Exception: if Deployment is set but the workflow's effective behavior is UNSPECIFIED, it means the workflow is unversioned, so effective deployment will be nil.
Note: Deployment objects are immutable, never change their fields.
func (*MutableStateImpl) GetEffectiveVersioningBehavior ¶ added in v1.26.2
func (ms *MutableStateImpl) GetEffectiveVersioningBehavior() enumspb.VersioningBehavior
GetEffectiveVersioningBehavior returns the effective versioning behavior in the following order:
- VersioningOverride.Behavior: this is returned when user has set a behavior override at wf start time, or later via UpdateWorkflowExecutionOptions.
- Behavior: this is returned when there is no override (most common case). Behavior is set based on the worker-sent deployment in the latest WFT completion.
func (*MutableStateImpl) GetExecutionInfo ¶
func (ms *MutableStateImpl) GetExecutionInfo() *persistencespb.WorkflowExecutionInfo
func (*MutableStateImpl) GetExecutionState ¶
func (ms *MutableStateImpl) GetExecutionState() *persistencespb.WorkflowExecutionState
func (*MutableStateImpl) GetFirstRunID ¶ added in v1.13.0
func (ms *MutableStateImpl) GetFirstRunID( ctx context.Context, ) (string, error)
func (*MutableStateImpl) GetHSMCompletionCallbackArg ¶ added in v1.25.0
func (ms *MutableStateImpl) GetHSMCompletionCallbackArg(ctx context.Context) (*persistencespb.HSMCompletionCallbackArg, error)
GetHSMCallbackArg converts a workflow completion event into a persistencespb.HSMCallbackArg.
func (*MutableStateImpl) GetHistorySize ¶ added in v1.21.0
func (ms *MutableStateImpl) GetHistorySize() int64
func (*MutableStateImpl) GetInheritedBuildId ¶ added in v1.24.0
func (ms *MutableStateImpl) GetInheritedBuildId() string
func (*MutableStateImpl) GetLastCompletedWorkflowTaskStartedEventId ¶ added in v1.25.0
func (ms *MutableStateImpl) GetLastCompletedWorkflowTaskStartedEventId() int64
GetStartedEventIdForLastCompletedWorkflowTask returns last started workflow task event ID
func (*MutableStateImpl) GetLastEventVersion ¶ added in v1.25.0
func (ms *MutableStateImpl) GetLastEventVersion() (int64, error)
func (*MutableStateImpl) GetLastFirstEventIDTxnID ¶
func (ms *MutableStateImpl) GetLastFirstEventIDTxnID() (int64, int64)
GetLastFirstEventIDTxnID returns last first event ID and corresponding transaction ID first event ID is the ID of a batch of events in a single history events record
func (*MutableStateImpl) GetLastWriteVersion ¶
func (ms *MutableStateImpl) GetLastWriteVersion() (int64, error)
func (*MutableStateImpl) GetMostRecentWorkerVersionStamp ¶ added in v1.24.0
func (ms *MutableStateImpl) GetMostRecentWorkerVersionStamp() *commonpb.WorkerVersionStamp
func (*MutableStateImpl) GetNamespaceEntry ¶
func (ms *MutableStateImpl) GetNamespaceEntry() *namespace.Namespace
func (*MutableStateImpl) GetNextEventID ¶
func (ms *MutableStateImpl) GetNextEventID() int64
GetNextEventID returns next event ID
func (*MutableStateImpl) GetNexusCompletion ¶ added in v1.24.0
func (ms *MutableStateImpl) GetNexusCompletion(ctx context.Context) (nexus.OperationCompletion, error)
GetNexusCompletion converts a workflow completion event into a nexus.OperationCompletion. Completions may be sent to arbitrary third parties, we intentionally do not include any termination reasons, and expose only failure messages.
func (*MutableStateImpl) GetPendingActivityInfos ¶
func (ms *MutableStateImpl) GetPendingActivityInfos() map[int64]*persistencespb.ActivityInfo
func (*MutableStateImpl) GetPendingChildExecutionInfos ¶
func (ms *MutableStateImpl) GetPendingChildExecutionInfos() map[int64]*persistencespb.ChildExecutionInfo
func (*MutableStateImpl) GetPendingRequestCancelExternalInfos ¶
func (ms *MutableStateImpl) GetPendingRequestCancelExternalInfos() map[int64]*persistencespb.RequestCancelInfo
func (*MutableStateImpl) GetPendingSignalExternalInfos ¶
func (ms *MutableStateImpl) GetPendingSignalExternalInfos() map[int64]*persistencespb.SignalInfo
func (*MutableStateImpl) GetPendingSignalRequestedIds ¶ added in v1.26.0
func (ms *MutableStateImpl) GetPendingSignalRequestedIds() []string
func (*MutableStateImpl) GetPendingTimerInfos ¶
func (ms *MutableStateImpl) GetPendingTimerInfos() map[string]*persistencespb.TimerInfo
func (*MutableStateImpl) GetPendingWorkflowTask ¶
func (ms *MutableStateImpl) GetPendingWorkflowTask() *historyi.WorkflowTaskInfo
func (*MutableStateImpl) GetQueryRegistry ¶
func (ms *MutableStateImpl) GetQueryRegistry() historyi.QueryRegistry
func (*MutableStateImpl) GetReapplyCandidateEvents ¶ added in v1.27.0
func (ms *MutableStateImpl) GetReapplyCandidateEvents() []*historypb.HistoryEvent
func (*MutableStateImpl) GetRequestCancelInfo ¶
func (ms *MutableStateImpl) GetRequestCancelInfo( initiatedEventID int64, ) (*persistencespb.RequestCancelInfo, bool)
GetRequestCancelInfo gives details about a request cancellation that is currently in progress.
func (*MutableStateImpl) GetRequesteCancelExternalInitiatedEvent ¶ added in v1.16.0
func (ms *MutableStateImpl) GetRequesteCancelExternalInitiatedEvent( ctx context.Context, initiatedEventID int64, ) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) GetRetryBackoffDuration ¶
func (ms *MutableStateImpl) GetRetryBackoffDuration( failure *failurepb.Failure, ) (time.Duration, enumspb.RetryState)
func (*MutableStateImpl) GetSignalExternalInitiatedEvent ¶ added in v1.14.0
func (ms *MutableStateImpl) GetSignalExternalInitiatedEvent( ctx context.Context, initiatedEventID int64, ) (*historypb.HistoryEvent, error)
GetSignalExternalInitiatedEvent get the details about signal external workflow
func (*MutableStateImpl) GetSignalInfo ¶
func (ms *MutableStateImpl) GetSignalInfo( initiatedEventID int64, ) (*persistencespb.SignalInfo, bool)
GetSignalInfo get the details about a signal request that is currently in progress.
func (*MutableStateImpl) GetStartEvent ¶
func (ms *MutableStateImpl) GetStartEvent( ctx context.Context, ) (*historypb.HistoryEvent, error)
GetStartEvent retrieves the workflow start event from mutable state
func (*MutableStateImpl) GetStartVersion ¶
func (ms *MutableStateImpl) GetStartVersion() (int64, error)
func (*MutableStateImpl) GetStartedWorkflowTask ¶ added in v1.21.0
func (ms *MutableStateImpl) GetStartedWorkflowTask() *historyi.WorkflowTaskInfo
func (*MutableStateImpl) GetTransientWorkflowTaskInfo ¶ added in v1.20.0
func (ms *MutableStateImpl) GetTransientWorkflowTaskInfo( workflowTask *historyi.WorkflowTaskInfo, identity string, ) *historyspb.TransientWorkflowTaskInfo
TODO (alex-update): Transient needs to be renamed to "TransientOrSpeculative"
func (*MutableStateImpl) GetUpdateCondition ¶
func (ms *MutableStateImpl) GetUpdateCondition() (int64, int64)
func (*MutableStateImpl) GetUpdateOutcome ¶ added in v1.21.0
func (*MutableStateImpl) GetUserTimerInfo ¶
func (ms *MutableStateImpl) GetUserTimerInfo( timerID string, ) (*persistencespb.TimerInfo, bool)
GetUserTimerInfo gives details about a user timer.
func (*MutableStateImpl) GetUserTimerInfoByEventID ¶
func (ms *MutableStateImpl) GetUserTimerInfoByEventID( startEventID int64, ) (*persistencespb.TimerInfo, bool)
GetUserTimerInfoByEventID gives details about a user timer.
func (*MutableStateImpl) GetWorkerDeploymentSA ¶ added in v1.27.0
func (ms *MutableStateImpl) GetWorkerDeploymentSA() string
func (*MutableStateImpl) GetWorkerDeploymentVersionSA ¶ added in v1.27.0
func (ms *MutableStateImpl) GetWorkerDeploymentVersionSA() string
func (*MutableStateImpl) GetWorkflowCloseTime ¶ added in v1.17.0
GetWorkflowCloseTime returns workflow closed time, returns a zero time for open workflow
func (*MutableStateImpl) GetWorkflowExecutionDuration ¶ added in v1.24.0
func (ms *MutableStateImpl) GetWorkflowExecutionDuration(ctx context.Context) (time.Duration, error)
GetWorkflowExecutionDuration returns the workflow execution duration. Returns zero for open workflow.
func (*MutableStateImpl) GetWorkflowKey ¶ added in v1.14.0
func (ms *MutableStateImpl) GetWorkflowKey() definition.WorkflowKey
func (*MutableStateImpl) GetWorkflowStateStatus ¶
func (ms *MutableStateImpl) GetWorkflowStateStatus() (enumsspb.WorkflowExecutionState, enumspb.WorkflowExecutionStatus)
func (*MutableStateImpl) GetWorkflowTaskByID ¶ added in v1.21.0
func (ms *MutableStateImpl) GetWorkflowTaskByID(scheduledEventID int64) *historyi.WorkflowTaskInfo
GetWorkflowTaskByID returns details about the current workflow task by scheduled event ID.
func (*MutableStateImpl) GetWorkflowType ¶
func (ms *MutableStateImpl) GetWorkflowType() *commonpb.WorkflowType
func (*MutableStateImpl) GetWorkflowVersioningBehaviorSA ¶ added in v1.27.0
func (ms *MutableStateImpl) GetWorkflowVersioningBehaviorSA() enumspb.VersioningBehavior
func (*MutableStateImpl) HSM ¶ added in v1.24.0
func (ms *MutableStateImpl) HSM() *hsm.Node
func (*MutableStateImpl) HadOrHasWorkflowTask ¶ added in v1.21.0
func (ms *MutableStateImpl) HadOrHasWorkflowTask() bool
func (*MutableStateImpl) HasAnyBufferedEvent ¶ added in v1.21.0
func (ms *MutableStateImpl) HasAnyBufferedEvent(filter historybuilder.BufferedEventFilter) bool
HasAnyBufferedEvent returns true if there is at least one buffered event that matches the provided filter.
func (*MutableStateImpl) HasBufferedEvents ¶
func (ms *MutableStateImpl) HasBufferedEvents() bool
func (*MutableStateImpl) HasCompletedAnyWorkflowTask ¶ added in v1.25.0
func (ms *MutableStateImpl) HasCompletedAnyWorkflowTask() bool
func (*MutableStateImpl) HasParentExecution ¶
func (ms *MutableStateImpl) HasParentExecution() bool
func (*MutableStateImpl) HasPendingWorkflowTask ¶
func (ms *MutableStateImpl) HasPendingWorkflowTask() bool
func (*MutableStateImpl) HasStartedWorkflowTask ¶ added in v1.21.0
func (ms *MutableStateImpl) HasStartedWorkflowTask() bool
func (*MutableStateImpl) InitTransitionHistory ¶ added in v1.26.2
func (ms *MutableStateImpl) InitTransitionHistory()
func (*MutableStateImpl) IsCancelRequested ¶
func (ms *MutableStateImpl) IsCancelRequested() bool
func (*MutableStateImpl) IsCurrentWorkflowGuaranteed ¶
func (ms *MutableStateImpl) IsCurrentWorkflowGuaranteed() bool
func (*MutableStateImpl) IsDirty ¶ added in v1.22.0
func (ms *MutableStateImpl) IsDirty() bool
IsDirty is used for sanity check that mutable state is "clean" after mutable state lock is released. However, certain in-memory changes (e.g. speculative workflow task) won't be cleared before releasing the lock and have to be excluded from the check.
func (*MutableStateImpl) IsResetRun ¶ added in v1.27.0
func (ms *MutableStateImpl) IsResetRun() bool
IsResetRun returns true if this run is the result of a reset operation. A run is a reset run if OriginalExecutionRunID points to another run.
This method only works for workflows started by server version 1.27.0+. Older workflows don't have OriginalExecutionRunID set in mutable state, and this method will NOT try to load WorkflowExecutionStarted event to get that information.
func (*MutableStateImpl) IsResourceDuplicated ¶
func (ms *MutableStateImpl) IsResourceDuplicated( resourceDedupKey definition.DeduplicationID, ) bool
func (*MutableStateImpl) IsSignalRequested ¶
func (ms *MutableStateImpl) IsSignalRequested( requestID string, ) bool
func (*MutableStateImpl) IsStickyTaskQueueSet ¶ added in v1.21.0
func (ms *MutableStateImpl) IsStickyTaskQueueSet() bool
func (*MutableStateImpl) IsSubStateMachineDeleted ¶ added in v1.27.0
func (ms *MutableStateImpl) IsSubStateMachineDeleted() bool
func (*MutableStateImpl) IsTransientWorkflowTask ¶ added in v1.20.0
func (ms *MutableStateImpl) IsTransientWorkflowTask() bool
func (*MutableStateImpl) IsTransitionHistoryEnabled ¶ added in v1.26.2
func (ms *MutableStateImpl) IsTransitionHistoryEnabled() bool
func (*MutableStateImpl) IsWorkflowCloseAttempted ¶ added in v1.21.0
func (ms *MutableStateImpl) IsWorkflowCloseAttempted() bool
func (*MutableStateImpl) IsWorkflowExecutionRunning ¶
func (ms *MutableStateImpl) IsWorkflowExecutionRunning() bool
func (*MutableStateImpl) IsWorkflowPendingOnWorkflowTaskBackoff ¶ added in v1.16.3
func (ms *MutableStateImpl) IsWorkflowPendingOnWorkflowTaskBackoff() bool
func (*MutableStateImpl) LoadHistoryEvent ¶ added in v1.24.0
func (ms *MutableStateImpl) LoadHistoryEvent(ctx context.Context, token []byte) (*historypb.HistoryEvent, error)
func (*MutableStateImpl) NextTransitionCount ¶ added in v1.25.0
func (ms *MutableStateImpl) NextTransitionCount() int64
NextTransitionCount implements hsm.NodeBackend.
func (*MutableStateImpl) PopTasks ¶ added in v1.17.0
func (ms *MutableStateImpl) PopTasks() map[tasks.Category][]tasks.Task
func (*MutableStateImpl) RecordLastActivityCompleteTime ¶ added in v1.26.2
func (ms *MutableStateImpl) RecordLastActivityCompleteTime(ai *persistencespb.ActivityInfo)
func (*MutableStateImpl) RefreshExpirationTimeoutTask ¶ added in v1.25.0
func (ms *MutableStateImpl) RefreshExpirationTimeoutTask(ctx context.Context) error
func (*MutableStateImpl) RegenerateActivityRetryTask ¶ added in v1.26.2
func (ms *MutableStateImpl) RegenerateActivityRetryTask(ai *persistencespb.ActivityInfo, nextScheduledTime time.Time) error
func (*MutableStateImpl) RejectWorkflowExecutionUpdate ¶ added in v1.20.0
func (ms *MutableStateImpl) RejectWorkflowExecutionUpdate(_ string, _ *updatepb.Rejection) error
func (*MutableStateImpl) RemoveSpeculativeWorkflowTaskTimeoutTask ¶ added in v1.21.0
func (ms *MutableStateImpl) RemoveSpeculativeWorkflowTaskTimeoutTask()
func (*MutableStateImpl) RetryActivity ¶
func (ms *MutableStateImpl) RetryActivity( ai *persistencespb.ActivityInfo, activityFailure *failurepb.Failure, ) (enumspb.RetryState, error)
func (*MutableStateImpl) SetBaseWorkflow ¶ added in v1.21.0
func (ms *MutableStateImpl) SetBaseWorkflow( baseRunID string, baseRunLowestCommonAncestorEventID int64, baseRunLowestCommonAncestorEventVersion int64, )
func (*MutableStateImpl) SetChildrenInitializedPostResetPoint ¶ added in v1.27.0
func (ms *MutableStateImpl) SetChildrenInitializedPostResetPoint(children map[string]*persistencespb.ResetChildInfo)
func (*MutableStateImpl) SetCurrentBranchToken ¶
func (ms *MutableStateImpl) SetCurrentBranchToken( branchToken []byte, ) error
func (*MutableStateImpl) SetHistoryBuilder ¶
func (ms *MutableStateImpl) SetHistoryBuilder(hBuilder *historybuilder.HistoryBuilder)
func (*MutableStateImpl) SetHistoryTree ¶
func (ms *MutableStateImpl) SetHistoryTree( executionTimeout *durationpb.Duration, runTimeout *durationpb.Duration, treeID string, ) error
SetHistoryTree set treeID/historyBranches
func (*MutableStateImpl) SetSpeculativeWorkflowTaskTimeoutTask ¶ added in v1.21.0
func (ms *MutableStateImpl) SetSpeculativeWorkflowTaskTimeoutTask( task *tasks.WorkflowTaskTimeoutTask, ) error
func (*MutableStateImpl) SetStickyTaskQueue ¶ added in v1.21.0
func (ms *MutableStateImpl) SetStickyTaskQueue(name string, scheduleToStartTimeout *durationpb.Duration)
func (*MutableStateImpl) SetUpdateCondition ¶
func (ms *MutableStateImpl) SetUpdateCondition( nextEventIDInDB int64, dbRecordVersion int64, )
func (*MutableStateImpl) ShouldResetActivityTimerTaskMask ¶ added in v1.26.2
func (ms *MutableStateImpl) ShouldResetActivityTimerTaskMask(current, incoming *persistencespb.ActivityInfo) bool
func (*MutableStateImpl) StartDeploymentTransition ¶ added in v1.26.2
func (ms *MutableStateImpl) StartDeploymentTransition(deployment *deploymentpb.Deployment) error
StartDeploymentTransition starts a transition to the given deployment which must be different from workflows effective deployment. Will fail if the workflow is pinned. Starting a new transition replaces current transition, if present, without rescheduling activities. If there is a pending workflow task that is not started yet, it'll be rescheduled after transition start.
func (*MutableStateImpl) StartTransaction ¶
func (ms *MutableStateImpl) StartTransaction( namespaceEntry *namespace.Namespace, ) (bool, error)
func (*MutableStateImpl) TaskQueueScheduleToStartTimeout ¶ added in v1.21.0
func (ms *MutableStateImpl) TaskQueueScheduleToStartTimeout(tqName string) (*taskqueuepb.TaskQueue, *durationpb.Duration)
TaskQueueScheduleToStartTimeout returns TaskQueue struct and corresponding StartToClose timeout. Task queue kind (sticky or normal) is set based on comparison of normal task queue name in mutable state and provided name. ScheduleToStartTimeout is set based on queue kind and workflow task type.
func (*MutableStateImpl) UpdateActivity ¶
func (ms *MutableStateImpl) UpdateActivity(scheduledEventId int64, updater historyi.ActivityUpdater) error
func (*MutableStateImpl) UpdateActivityInfo ¶ added in v1.24.0
func (ms *MutableStateImpl) UpdateActivityInfo( incomingActivityInfo *historyservice.ActivitySyncInfo, resetActivityTimerTaskStatus bool, ) error
UpdateActivityInfo applies the necessary activity information
func (*MutableStateImpl) UpdateActivityProgress ¶
func (ms *MutableStateImpl) UpdateActivityProgress( ai *persistencespb.ActivityInfo, request *workflowservice.RecordActivityTaskHeartbeatRequest, )
func (*MutableStateImpl) UpdateActivityTaskStatusWithTimerHeartbeat ¶ added in v1.26.2
func (ms *MutableStateImpl) UpdateActivityTaskStatusWithTimerHeartbeat(scheduleEventID int64, timerTaskStatus int32, heartbeatTimeoutVisibility *time.Time) error
UpdateActivityTaskStatusWithTimerHeartbeat updates an activity's timer task status or/and timer heartbeat
func (*MutableStateImpl) UpdateBuildIdAssignment ¶ added in v1.24.0
func (ms *MutableStateImpl) UpdateBuildIdAssignment(buildId string) error
UpdateBuildIdAssignment based on initial assignment or a redirect
func (*MutableStateImpl) UpdateCurrentVersion ¶
func (ms *MutableStateImpl) UpdateCurrentVersion( version int64, forceUpdate bool, ) error
func (*MutableStateImpl) UpdateDuplicatedResource ¶
func (ms *MutableStateImpl) UpdateDuplicatedResource( resourceDedupKey definition.DeduplicationID, )
func (*MutableStateImpl) UpdateResetRunID ¶ added in v1.26.2
func (ms *MutableStateImpl) UpdateResetRunID(runID string)
func (*MutableStateImpl) UpdateUserTimer ¶
func (ms *MutableStateImpl) UpdateUserTimer( ti *persistencespb.TimerInfo, ) error
UpdateUserTimer updates the user timer in progress.
func (*MutableStateImpl) UpdateUserTimerTaskStatus ¶ added in v1.26.2
func (ms *MutableStateImpl) UpdateUserTimerTaskStatus(timerID string, status int64) error
func (*MutableStateImpl) UpdateWorkflowStateStatus ¶
func (ms *MutableStateImpl) UpdateWorkflowStateStatus( state enumsspb.WorkflowExecutionState, status enumspb.WorkflowExecutionStatus, ) error
func (*MutableStateImpl) VisitUpdates ¶ added in v1.21.0
func (ms *MutableStateImpl) VisitUpdates(visitor func(updID string, updInfo *persistencespb.UpdateInfo))
VisitUpdates visits mutable state update entries, ordered by the ID of the history event pointed to by the mutable state entry. Thus, for example, updates entries in Admitted state will be visited in the order that their Admitted events were added to history.
type MutableStateRebuilder ¶
type MutableStateRebuilder interface { ApplyEvents( ctx context.Context, namespaceID namespace.ID, requestID string, execution *commonpb.WorkflowExecution, history [][]*historypb.HistoryEvent, newRunHistory []*historypb.HistoryEvent, newRunID string, ) (historyi.MutableState, error) }
type MutableStateRebuilderImpl ¶
type MutableStateRebuilderImpl struct {
// contains filtered or unexported fields
}
func NewMutableStateRebuilder ¶
func NewMutableStateRebuilder( shard historyi.ShardContext, logger log.Logger, mutableState historyi.MutableState, ) *MutableStateRebuilderImpl
func (*MutableStateRebuilderImpl) ApplyEvents ¶
func (b *MutableStateRebuilderImpl) ApplyEvents( ctx context.Context, namespaceID namespace.ID, requestID string, execution *commonpb.WorkflowExecution, history [][]*historypb.HistoryEvent, newRunHistory []*historypb.HistoryEvent, newRunID string, ) (historyi.MutableState, error)
type MutableStateWithEffects ¶ added in v1.21.0
type MutableStateWithEffects struct { historyi.MutableState effect.Controller }
func WithEffects ¶ added in v1.21.0
func WithEffects(effects effect.Controller, ms historyi.MutableState) MutableStateWithEffects
func (MutableStateWithEffects) CanAddEvent ¶ added in v1.24.0
func (mse MutableStateWithEffects) CanAddEvent() bool
type RelocatableAttributes ¶ added in v1.20.0
type RelocatableAttributes struct { Memo *commonpb.Memo SearchAttributes *commonpb.SearchAttributes }
RelocatableAttributes contains workflow attributes that can be moved from the mutable state to the persistence backend.
type RelocatableAttributesFetcher ¶ added in v1.20.0
type RelocatableAttributesFetcher interface { Fetch( ctx context.Context, mutableState historyi.MutableState, ) (*RelocatableAttributes, error) }
RelocatableAttributesFetcher is used to fetch the relocatable attributes from the mutable state. Relocatable attributes are attributes that can be moved from the mutable state to the persistence backend.
func RelocatableAttributesFetcherProvider ¶ added in v1.20.0
func RelocatableAttributesFetcherProvider( config *configs.Config, visibilityManager manager.VisibilityManager, ) RelocatableAttributesFetcher
RelocatableAttributesFetcherProvider provides a new instance of a RelocatableAttributesFetcher. The manager.VisibilityManager parameter is used to fetch the relocatable attributes from the persistence backend iff we already moved them there out from the mutable state. The visibility manager is not used if the relocatable attributes are still in the mutable state. We detect that the fields have moved by checking the RelocatableAttributesRemoved flag in the mutable state. Because the relocatable fields that we push to persistence are never updated thereafter, we may cache them on a per-workflow execution basis. Currently, there is no cache, but you may provide a manager.VisibilityManager that supports caching to this function safely. TODO: Add a cache around the visibility manager for the relocatable attributes.
type TaskGenerator ¶
type TaskGenerator interface { GenerateWorkflowStartTasks( startEvent *historypb.HistoryEvent, ) (executionTimeoutTimerTaskStatus int32, err error) GenerateWorkflowCloseTasks( closedTime time.Time, deleteAfterClose bool, ) error // GenerateDeleteHistoryEventTask adds a tasks.DeleteHistoryEventTask to the mutable state. // This task is used to delete the history events of the workflow execution after the retention period expires. GenerateDeleteHistoryEventTask(closeTime time.Time) error GenerateDeleteExecutionTask() (*tasks.DeleteExecutionTask, error) GenerateRecordWorkflowStartedTasks( startEvent *historypb.HistoryEvent, ) error GenerateDelayedWorkflowTasks( startEvent *historypb.HistoryEvent, ) error GenerateScheduleWorkflowTaskTasks( workflowTaskScheduledEventID int64, ) error GenerateScheduleSpeculativeWorkflowTaskTasks( workflowTask *historyi.WorkflowTaskInfo, ) error GenerateStartWorkflowTaskTasks( workflowTaskScheduledEventID int64, ) error GenerateActivityTasks( activityScheduledEventID int64, ) error GenerateActivityRetryTasks(activityInfo *persistencespb.ActivityInfo) error GenerateChildWorkflowTasks( event *historypb.HistoryEvent, ) error GenerateRequestCancelExternalTasks( event *historypb.HistoryEvent, ) error GenerateSignalExternalTasks( event *historypb.HistoryEvent, ) error GenerateUpsertVisibilityTask() error GenerateWorkflowResetTasks() error // these 2 APIs should only be called when mutable state transaction is being closed GenerateActivityTimerTasks() error GenerateUserTimerTasks() error // replication tasks GenerateHistoryReplicationTasks( eventBatches [][]*historypb.HistoryEvent, ) ([]tasks.Task, error) GenerateMigrationTasks() ([]tasks.Task, int64, error) // Generate tasks for any updated state machines on mutable state. // Looks up machine definition in the provided registry. // Must be called **after** updating transition history for the current transition GenerateDirtySubStateMachineTasks(stateMachineRegistry *hsm.Registry) error }
type TaskGeneratorImpl ¶
type TaskGeneratorImpl struct {
// contains filtered or unexported fields
}
func NewTaskGenerator ¶
func NewTaskGenerator( namespaceRegistry namespace.Registry, mutableState historyi.MutableState, config *configs.Config, archivalMetadata archiver.ArchivalMetadata, ) *TaskGeneratorImpl
func (*TaskGeneratorImpl) GenerateActivityRetryTasks ¶
func (r *TaskGeneratorImpl) GenerateActivityRetryTasks(activityInfo *persistencespb.ActivityInfo) error
func (*TaskGeneratorImpl) GenerateActivityTasks ¶ added in v1.16.0
func (r *TaskGeneratorImpl) GenerateActivityTasks( activityScheduledEventID int64, ) error
func (*TaskGeneratorImpl) GenerateActivityTimerTasks ¶
func (r *TaskGeneratorImpl) GenerateActivityTimerTasks() error
func (*TaskGeneratorImpl) GenerateChildWorkflowTasks ¶
func (r *TaskGeneratorImpl) GenerateChildWorkflowTasks( event *historypb.HistoryEvent, ) error
func (*TaskGeneratorImpl) GenerateDelayedWorkflowTasks ¶
func (r *TaskGeneratorImpl) GenerateDelayedWorkflowTasks( startEvent *historypb.HistoryEvent, ) error
func (*TaskGeneratorImpl) GenerateDeleteExecutionTask ¶ added in v1.15.0
func (r *TaskGeneratorImpl) GenerateDeleteExecutionTask() (*tasks.DeleteExecutionTask, error)
func (*TaskGeneratorImpl) GenerateDeleteHistoryEventTask ¶ added in v1.20.0
func (r *TaskGeneratorImpl) GenerateDeleteHistoryEventTask(closeTime time.Time) error
GenerateDeleteHistoryEventTask adds a task to delete all history events for a workflow execution. This method only adds the task to the mutable state object in memory; it does not write the task to the database. You must call shard.Context#AddTasks to notify the history engine of this task.
func (*TaskGeneratorImpl) GenerateDirtySubStateMachineTasks ¶ added in v1.24.0
func (r *TaskGeneratorImpl) GenerateDirtySubStateMachineTasks( stateMachineRegistry *hsm.Registry, ) error
func (*TaskGeneratorImpl) GenerateHistoryReplicationTasks ¶ added in v1.14.0
func (r *TaskGeneratorImpl) GenerateHistoryReplicationTasks( eventBatches [][]*historypb.HistoryEvent, ) ([]tasks.Task, error)
func (*TaskGeneratorImpl) GenerateMigrationTasks ¶ added in v1.17.0
func (r *TaskGeneratorImpl) GenerateMigrationTasks() ([]tasks.Task, int64, error)
func (*TaskGeneratorImpl) GenerateRecordWorkflowStartedTasks ¶
func (r *TaskGeneratorImpl) GenerateRecordWorkflowStartedTasks( startEvent *historypb.HistoryEvent, ) error
func (*TaskGeneratorImpl) GenerateRequestCancelExternalTasks ¶
func (r *TaskGeneratorImpl) GenerateRequestCancelExternalTasks( event *historypb.HistoryEvent, ) error
func (*TaskGeneratorImpl) GenerateScheduleSpeculativeWorkflowTaskTasks ¶ added in v1.23.0
func (r *TaskGeneratorImpl) GenerateScheduleSpeculativeWorkflowTaskTasks( workflowTask *historyi.WorkflowTaskInfo, ) error
GenerateScheduleSpeculativeWorkflowTaskTasks is different from GenerateScheduleWorkflowTaskTasks (above):
- Always create ScheduleToStart timeout timer task (even for normal task queue).
- Don't create transfer task to push WT to matching.
func (*TaskGeneratorImpl) GenerateScheduleWorkflowTaskTasks ¶
func (r *TaskGeneratorImpl) GenerateScheduleWorkflowTaskTasks( workflowTaskScheduledEventID int64, ) error
func (*TaskGeneratorImpl) GenerateSignalExternalTasks ¶
func (r *TaskGeneratorImpl) GenerateSignalExternalTasks( event *historypb.HistoryEvent, ) error
func (*TaskGeneratorImpl) GenerateStartWorkflowTaskTasks ¶
func (r *TaskGeneratorImpl) GenerateStartWorkflowTaskTasks( workflowTaskScheduledEventID int64, ) error
func (*TaskGeneratorImpl) GenerateUpsertVisibilityTask ¶ added in v1.18.0
func (r *TaskGeneratorImpl) GenerateUpsertVisibilityTask() error
func (*TaskGeneratorImpl) GenerateUserTimerTasks ¶
func (r *TaskGeneratorImpl) GenerateUserTimerTasks() error
func (*TaskGeneratorImpl) GenerateWorkflowCloseTasks ¶
func (r *TaskGeneratorImpl) GenerateWorkflowCloseTasks( closedTime time.Time, deleteAfterClose bool, ) error
func (*TaskGeneratorImpl) GenerateWorkflowResetTasks ¶
func (r *TaskGeneratorImpl) GenerateWorkflowResetTasks() error
func (*TaskGeneratorImpl) GenerateWorkflowStartTasks ¶
func (r *TaskGeneratorImpl) GenerateWorkflowStartTasks( startEvent *historypb.HistoryEvent, ) (int32, error)
type TaskGeneratorProvider ¶ added in v1.16.0
type TaskGeneratorProvider interface {
NewTaskGenerator(historyi.ShardContext, historyi.MutableState) TaskGenerator
}
func GetTaskGeneratorProvider ¶ added in v1.26.2
func GetTaskGeneratorProvider() TaskGeneratorProvider
type TaskRefresher ¶
type TaskRefresher interface { // Refresh refreshes all tasks needed for the state machine to make progress or // those have side effects. Refresh( ctx context.Context, mutableState historyi.MutableState, ) error // PartialRefresh refresh tasks for all sub state machines that have been updated // since the given minVersionedTransition (inclusive). // If a sub state machine's lastUpdateVersionedTransition is not available, // it will be treated the same as lastUpdateVersionedTransition equals to EmptyVersionedTransition. // The provided minVersionedTransition should NOT be nil, and if equals to EmptyVersionedTransition, // the behavior is equivalent to Refresh(). PartialRefresh( ctx context.Context, mutableState historyi.MutableState, minVersionedTransition *persistencespb.VersionedTransition, ) error }
type TaskRefresherImpl ¶
type TaskRefresherImpl struct {
// contains filtered or unexported fields
}
func NewTaskRefresher ¶
func NewTaskRefresher( shard historyi.ShardContext, ) *TaskRefresherImpl
func (*TaskRefresherImpl) PartialRefresh ¶ added in v1.25.0
func (r *TaskRefresherImpl) PartialRefresh( ctx context.Context, mutableState historyi.MutableState, minVersionedTransition *persistencespb.VersionedTransition, ) error
func (*TaskRefresherImpl) Refresh ¶ added in v1.25.0
func (r *TaskRefresherImpl) Refresh( ctx context.Context, mutableState historyi.MutableState, ) error
type TimerSequence ¶
type TimerSequence interface { CreateNextUserTimer() (bool, error) CreateNextActivityTimer() (bool, error) LoadAndSortUserTimers() []TimerSequenceID LoadAndSortActivityTimers() []TimerSequenceID }
type TimerSequenceID ¶
type TimerSequenceID struct { EventID int64 Timestamp time.Time TimerType enumspb.TimeoutType TimerCreated bool Attempt int32 }
TimerSequenceID represent a in mem timer
type TimerSequenceIDs ¶
type TimerSequenceIDs []TimerSequenceID
func (TimerSequenceIDs) Less ¶
func (s TimerSequenceIDs) Less( this int, that int, ) bool
Less implements sort.Interface
func (TimerSequenceIDs) Swap ¶
func (s TimerSequenceIDs) Swap( this int, that int, )
Swap implements sort.Interface.
type Transaction ¶ added in v1.12.0
type Transaction interface { CreateWorkflowExecution( ctx context.Context, createMode persistence.CreateWorkflowMode, newWorkflowFailoverVersion int64, newWorkflowSnapshot *persistence.WorkflowSnapshot, newWorkflowEventsSeq []*persistence.WorkflowEvents, ) (int64, error) ConflictResolveWorkflowExecution( ctx context.Context, conflictResolveMode persistence.ConflictResolveWorkflowMode, resetWorkflowFailoverVersion int64, resetWorkflowSnapshot *persistence.WorkflowSnapshot, resetWorkflowEventsSeq []*persistence.WorkflowEvents, newWorkflowFailoverVersion *int64, newWorkflowSnapshot *persistence.WorkflowSnapshot, newWorkflowEventsSeq []*persistence.WorkflowEvents, currentWorkflowFailoverVersion *int64, currentWorkflowMutation *persistence.WorkflowMutation, currentWorkflowEventsSeq []*persistence.WorkflowEvents, ) (int64, int64, int64, error) UpdateWorkflowExecution( ctx context.Context, updateMode persistence.UpdateWorkflowMode, currentWorkflowFailoverVersion int64, currentWorkflowMutation *persistence.WorkflowMutation, currentWorkflowEventsSeq []*persistence.WorkflowEvents, newWorkflowFailoverVersion *int64, newWorkflowSnapshot *persistence.WorkflowSnapshot, newWorkflowEventsSeq []*persistence.WorkflowEvents, ) (int64, int64, error) SetWorkflowExecution( ctx context.Context, workflowSnapshot *persistence.WorkflowSnapshot, ) error }
type TransactionImpl ¶ added in v1.12.0
type TransactionImpl struct {
// contains filtered or unexported fields
}
func NewTransaction ¶ added in v1.12.0
func NewTransaction( shardContext historyi.ShardContext, ) *TransactionImpl
func (*TransactionImpl) ConflictResolveWorkflowExecution ¶ added in v1.12.0
func (t *TransactionImpl) ConflictResolveWorkflowExecution( ctx context.Context, conflictResolveMode persistence.ConflictResolveWorkflowMode, resetWorkflowFailoverVersion int64, resetWorkflowSnapshot *persistence.WorkflowSnapshot, resetWorkflowEventsSeq []*persistence.WorkflowEvents, newWorkflowFailoverVersion *int64, newWorkflowSnapshot *persistence.WorkflowSnapshot, newWorkflowEventsSeq []*persistence.WorkflowEvents, currentWorkflowFailoverVersion *int64, currentWorkflowMutation *persistence.WorkflowMutation, currentWorkflowEventsSeq []*persistence.WorkflowEvents, ) (int64, int64, int64, error)
func (*TransactionImpl) CreateWorkflowExecution ¶ added in v1.12.0
func (t *TransactionImpl) CreateWorkflowExecution( ctx context.Context, createMode persistence.CreateWorkflowMode, newWorkflowFailoverVersion int64, newWorkflowSnapshot *persistence.WorkflowSnapshot, newWorkflowEventsSeq []*persistence.WorkflowEvents, ) (int64, error)
func (*TransactionImpl) SetWorkflowExecution ¶ added in v1.16.0
func (t *TransactionImpl) SetWorkflowExecution( ctx context.Context, workflowSnapshot *persistence.WorkflowSnapshot, ) error
func (*TransactionImpl) UpdateWorkflowExecution ¶ added in v1.12.0
func (t *TransactionImpl) UpdateWorkflowExecution( ctx context.Context, updateMode persistence.UpdateWorkflowMode, currentWorkflowFailoverVersion int64, currentWorkflowMutation *persistence.WorkflowMutation, currentWorkflowEventsSeq []*persistence.WorkflowEvents, newWorkflowFailoverVersion *int64, newWorkflowSnapshot *persistence.WorkflowSnapshot, newWorkflowEventsSeq []*persistence.WorkflowEvents, ) (int64, int64, error)
Source Files
¶
- activity.go
- checksum.go
- command_handler.go
- context.go
- fx.go
- metrics.go
- mutable_state_impl.go
- mutable_state_rebuilder.go
- mutable_state_rebuilder_mock.go
- mutable_state_state_status.go
- mutable_state_util.go
- noop_chasm_tree.go
- query.go
- query_registry.go
- relocatable_attributes_fetcher.go
- retry.go
- state_machine_definition.go
- state_machine_timers.go
- state_transition_history.go
- task_generator.go
- task_generator_mock.go
- task_generator_provider.go
- task_refresher.go
- task_refresher_mock.go
- test_util.go
- timer_sequence.go
- timer_sequence_mock.go
- transaction.go
- transaction_impl.go
- transaction_mock.go
- util.go
- workflow_task_state_machine.go
- workflow_task_state_machine_mock.go