Documentation ¶
Overview ¶
Package ndc is a generated GoMock package.
Package ndc is a generated GoMock package.
Package ndc is a generated GoMock package.
Package ndc is a generated GoMock package.
Package ndc is a generated GoMock package.
Package ndc is a generated GoMock package.
Package ndc is a generated GoMock package.
Package ndc is a generated GoMock package.
Package ndc is a generated GoMock package.
Package ndc is a generated GoMock package.
Package ndc is a generated GoMock package.
Package ndc is a generated GoMock package.
Package ndc is a generated GoMock package.
Index ¶
- Constants
- Variables
- func DeserializeBlobs(historySerializer serialization.Serializer, blobs []*commonpb.DataBlob) ([][]*historypb.HistoryEvent, error)
- func IsTerminatedByResetter(event *historypb.HistoryEvent) bool
- func NewResetter(shard shard.Context, transactionMgr TransactionManager, ...) *resetterImpl
- func NewTransactionManager(shardContext shard.Context, workflowCache wcache.Cache, ...) *transactionMgrImpl
- func NewWorkflowResetter(shardContext shard.Context, workflowCache wcache.Cache, logger log.Logger) *workflowResetterImpl
- func WorkflowHappensAfter(thisLastWriteVersion int64, thisLastEventTaskID int64, ...) bool
- type ActivityStateReplicator
- type ActivityStateReplicatorImpl
- type BranchMgr
- type BranchMgrImpl
- type BufferEventFlusher
- type BufferEventFlusherImpl
- type ConflictResolver
- type ConflictResolverImpl
- type EventBlobs
- type EventsReapplier
- type EventsReapplierImpl
- type GetOrRebuildMutableStateIn
- type HSMStateReplicator
- type HSMStateReplicatorImpl
- type HistoryBlobsPaginationItem
- type HistoryImporter
- type HistoryImporterImpl
- type HistoryReplicator
- type HistoryReplicatorImpl
- func (r *HistoryReplicatorImpl) ApplyEvents(ctx context.Context, request *historyservice.ReplicateEventsV2Request) (retError error)
- func (r *HistoryReplicatorImpl) BackfillHistoryEvents(ctx context.Context, request *shard.BackfillHistoryEventsRequest) error
- func (r *HistoryReplicatorImpl) ReplicateHistoryEvents(ctx context.Context, workflowKey definition.WorkflowKey, ...) error
- type MockActivityStateReplicator
- func (m *MockActivityStateReplicator) EXPECT() *MockActivityStateReplicatorMockRecorder
- func (m *MockActivityStateReplicator) SyncActivitiesState(ctx context.Context, request *historyservice.SyncActivitiesRequest) error
- func (m *MockActivityStateReplicator) SyncActivityState(ctx context.Context, request *historyservice.SyncActivityRequest) error
- type MockActivityStateReplicatorMockRecorder
- type MockBranchMgr
- func (m *MockBranchMgr) Create(ctx context.Context, incomingVersionHistory *history.VersionHistory, ...) (bool, int32, error)
- func (m *MockBranchMgr) EXPECT() *MockBranchMgrMockRecorder
- func (m *MockBranchMgr) GetOrCreate(ctx context.Context, incomingVersionHistory *history.VersionHistory, ...) (bool, int32, error)
- type MockBranchMgrMockRecorder
- type MockBufferEventFlusher
- type MockBufferEventFlusherMockRecorder
- type MockConflictResolver
- func (m *MockConflictResolver) EXPECT() *MockConflictResolverMockRecorder
- func (m *MockConflictResolver) GetOrRebuildCurrentMutableState(ctx context.Context, branchIndex int32, incomingVersion int64) (workflow.MutableState, bool, error)
- func (m *MockConflictResolver) GetOrRebuildMutableState(ctx context.Context, branchIndex int32) (workflow.MutableState, bool, error)
- type MockConflictResolverMockRecorder
- type MockEventsReapplier
- type MockEventsReapplierMockRecorder
- type MockHSMStateReplicator
- type MockHSMStateReplicatorMockRecorder
- type MockStateRebuilder
- type MockStateRebuilderMockRecorder
- type MockTransactionManager
- func (m *MockTransactionManager) BackfillWorkflow(ctx context.Context, targetWorkflow Workflow, ...) error
- func (m *MockTransactionManager) CheckWorkflowExists(ctx context.Context, namespaceID namespace.ID, workflowID, runID string) (bool, error)
- func (m *MockTransactionManager) CreateWorkflow(ctx context.Context, targetWorkflow Workflow) error
- func (m *MockTransactionManager) EXPECT() *MockTransactionManagerMockRecorder
- func (m *MockTransactionManager) GetCurrentWorkflowRunID(ctx context.Context, namespaceID namespace.ID, workflowID string) (string, error)
- func (m *MockTransactionManager) LoadWorkflow(ctx context.Context, namespaceID namespace.ID, workflowID, runID string) (Workflow, error)
- func (m *MockTransactionManager) UpdateWorkflow(ctx context.Context, isWorkflowRebuilt bool, ...) error
- type MockTransactionManagerMockRecorder
- func (mr *MockTransactionManagerMockRecorder) BackfillWorkflow(ctx, targetWorkflow interface{}, targetWorkflowEventsSlice ...interface{}) *gomock.Call
- func (mr *MockTransactionManagerMockRecorder) CheckWorkflowExists(ctx, namespaceID, workflowID, runID interface{}) *gomock.Call
- func (mr *MockTransactionManagerMockRecorder) CreateWorkflow(ctx, targetWorkflow interface{}) *gomock.Call
- func (mr *MockTransactionManagerMockRecorder) GetCurrentWorkflowRunID(ctx, namespaceID, workflowID interface{}) *gomock.Call
- func (mr *MockTransactionManagerMockRecorder) LoadWorkflow(ctx, namespaceID, workflowID, runID interface{}) *gomock.Call
- func (mr *MockTransactionManagerMockRecorder) UpdateWorkflow(ctx, isWorkflowRebuilt, targetWorkflow, newWorkflow interface{}) *gomock.Call
- type MockWorkflow
- func (m *MockWorkflow) EXPECT() *MockWorkflowMockRecorder
- func (m *MockWorkflow) FlushBufferedEvents() error
- func (m *MockWorkflow) GetContext() workflow.Context
- func (m *MockWorkflow) GetMutableState() workflow.MutableState
- func (m *MockWorkflow) GetReleaseFn() cache.ReleaseCacheFunc
- func (m *MockWorkflow) GetVectorClock() (int64, int64, error)
- func (m *MockWorkflow) HappensAfter(that Workflow) (bool, error)
- func (m *MockWorkflow) Revive() error
- func (m *MockWorkflow) SuppressBy(incomingWorkflow Workflow) (workflow.TransactionPolicy, error)
- type MockWorkflowMockRecorder
- func (mr *MockWorkflowMockRecorder) FlushBufferedEvents() *gomock.Call
- func (mr *MockWorkflowMockRecorder) GetContext() *gomock.Call
- func (mr *MockWorkflowMockRecorder) GetMutableState() *gomock.Call
- func (mr *MockWorkflowMockRecorder) GetReleaseFn() *gomock.Call
- func (mr *MockWorkflowMockRecorder) GetVectorClock() *gomock.Call
- func (mr *MockWorkflowMockRecorder) HappensAfter(that interface{}) *gomock.Call
- func (mr *MockWorkflowMockRecorder) Revive() *gomock.Call
- func (mr *MockWorkflowMockRecorder) SuppressBy(incomingWorkflow interface{}) *gomock.Call
- type MockWorkflowResetter
- type MockWorkflowResetterMockRecorder
- type MockWorkflowStateReplicator
- type MockWorkflowStateReplicatorMockRecorder
- type MocktransactionMgrForExistingWorkflow
- type MocktransactionMgrForExistingWorkflowMockRecorder
- type MocktransactionMgrForNewWorkflow
- type MocktransactionMgrForNewWorkflowMockRecorder
- type MutableStateInitializationSpec
- type MutableStateInitializer
- type MutableStateInitializerImpl
- func (r *MutableStateInitializerImpl) Initialize(ctx context.Context, workflowKey definition.WorkflowKey, token []byte) (Workflow, MutableStateInitializationSpec, error)
- func (r *MutableStateInitializerImpl) InitializeFromDB(ctx context.Context, namespaceEntry *namespace.Namespace, ...) (Workflow, MutableStateInitializationSpec, error)
- func (r *MutableStateInitializerImpl) InitializeFromToken(_ context.Context, namespaceEntry *namespace.Namespace, ...) (Workflow, MutableStateInitializationSpec, error)
- type MutableStateMapper
- type MutableStateMapperImpl
- func (m *MutableStateMapperImpl) ApplyEvents(ctx context.Context, wfContext workflow.Context, ...) (workflow.MutableState, workflow.MutableState, error)
- func (m *MutableStateMapperImpl) CreateHistoryBranch(ctx context.Context, wfContext workflow.Context, ...) (workflow.MutableState, PrepareHistoryBranchOut, error)
- func (m *MutableStateMapperImpl) FlushBufferEvents(ctx context.Context, wfContext workflow.Context, ...) (workflow.MutableState, struct{}, error)
- func (m *MutableStateMapperImpl) GetOrCreateHistoryBranch(ctx context.Context, wfContext workflow.Context, ...) (workflow.MutableState, PrepareHistoryBranchOut, error)
- func (m *MutableStateMapperImpl) GetOrRebuildCurrentMutableState(ctx context.Context, wfContext workflow.Context, ...) (workflow.MutableState, bool, error)
- func (m *MutableStateMapperImpl) GetOrRebuildMutableState(ctx context.Context, wfContext workflow.Context, ...) (workflow.MutableState, bool, error)
- type MutableStateToken
- type PrepareHistoryBranchOut
- type StateRebuilder
- type StateRebuilderImpl
- type TransactionManager
- type Workflow
- type WorkflowImpl
- func (r *WorkflowImpl) FlushBufferedEvents() error
- func (r *WorkflowImpl) GetContext() workflow.Context
- func (r *WorkflowImpl) GetMutableState() workflow.MutableState
- func (r *WorkflowImpl) GetReleaseFn() wcache.ReleaseCacheFunc
- func (r *WorkflowImpl) GetVectorClock() (int64, int64, error)
- func (r *WorkflowImpl) HappensAfter(that Workflow) (bool, error)
- func (r *WorkflowImpl) Revive() error
- func (r *WorkflowImpl) SuppressBy(incomingWorkflow Workflow) (workflow.TransactionPolicy, error)
- type WorkflowResetter
- type WorkflowStateReplicator
- type WorkflowStateReplicatorImpl
Constants ¶
const (
EventsReapplicationResetWorkflowReason = "events-reapplication"
)
Variables ¶
var ( // ErrInvalidNamespaceID is returned if namespace ID is invalid ErrInvalidNamespaceID = serviceerror.NewInvalidArgument("invalid namespace ID") // ErrInvalidExecution is returned if execution is invalid ErrInvalidExecution = serviceerror.NewInvalidArgument("invalid execution") // ErrInvalidRunID is returned if run ID is invalid ErrInvalidRunID = serviceerror.NewInvalidArgument("invalid run ID") // ErrEventIDMismatch is returned if event ID mis-matched ErrEventIDMismatch = serviceerror.NewInvalidArgument("event ID mismatch") // ErrEventVersionMismatch is returned if event version mis-matched ErrEventVersionMismatch = serviceerror.NewInvalidArgument("event version mismatch") // ErrNoNewRunHistory is returned if there is no new run history ErrNoNewRunHistory = serviceerror.NewInvalidArgument("no new run history events") // ErrNoNewRunID is returned if there is newRunHistory but no new runID ErrNoNewRunID = serviceerror.NewInvalidArgument("no new run ID") // ErrEmptyEventSlice is returned if any of event slice is empty ErrEmptyEventSlice = serviceerror.NewInvalidArgument("event slice is empty") // ErrEventSlicesNotConsecutive is returned if event slices are not consecutive ErrEventSlicesNotConsecutive = serviceerror.NewInvalidArgument("event slices are not consecutive") )
var ( WorkflowTerminationReason = "Terminate Workflow Due To Version Conflict." WorkflowTerminationIdentity = "history-service" )
Functions ¶
func DeserializeBlobs ¶ added in v1.23.0
func DeserializeBlobs( historySerializer serialization.Serializer, blobs []*commonpb.DataBlob, ) ([][]*historypb.HistoryEvent, error)
func IsTerminatedByResetter ¶
func IsTerminatedByResetter(event *historypb.HistoryEvent) bool
func NewResetter ¶
func NewTransactionManager ¶ added in v1.23.0
func NewWorkflowResetter ¶
Types ¶
type ActivityStateReplicator ¶ added in v1.22.0
type ActivityStateReplicatorImpl ¶ added in v1.22.0
type ActivityStateReplicatorImpl struct {
// contains filtered or unexported fields
}
func NewActivityStateReplicator ¶ added in v1.22.0
func (*ActivityStateReplicatorImpl) SyncActivitiesState ¶ added in v1.24.0
func (r *ActivityStateReplicatorImpl) SyncActivitiesState( ctx context.Context, request *historyservice.SyncActivitiesRequest, ) (retError error)
func (*ActivityStateReplicatorImpl) SyncActivityState ¶ added in v1.22.0
func (r *ActivityStateReplicatorImpl) SyncActivityState( ctx context.Context, request *historyservice.SyncActivityRequest, ) (retError error)
type BranchMgr ¶
type BranchMgr interface { GetOrCreate( ctx context.Context, incomingVersionHistory *historyspb.VersionHistory, incomingFirstEventID int64, incomingFirstEventVersion int64, ) (bool, int32, error) Create( ctx context.Context, incomingVersionHistory *historyspb.VersionHistory, incomingFirstEventID int64, incomingFirstEventVersion int64, ) (bool, int32, error) }
type BranchMgrImpl ¶
type BranchMgrImpl struct {
// contains filtered or unexported fields
}
func NewBranchMgr ¶
func NewBranchMgr( shard shard.Context, context workflow.Context, mutableState workflow.MutableState, logger log.Logger, ) *BranchMgrImpl
func (*BranchMgrImpl) Create ¶ added in v1.23.0
func (r *BranchMgrImpl) Create( ctx context.Context, incomingVersionHistory *historyspb.VersionHistory, incomingFirstEventID int64, incomingFirstEventVersion int64, ) (bool, int32, error)
func (*BranchMgrImpl) GetOrCreate ¶ added in v1.23.0
func (r *BranchMgrImpl) GetOrCreate( ctx context.Context, incomingVersionHistory *historyspb.VersionHistory, incomingFirstEventID int64, incomingFirstEventVersion int64, ) (bool, int32, error)
type BufferEventFlusher ¶ added in v1.23.0
type BufferEventFlusher interface {
// contains filtered or unexported methods
}
type BufferEventFlusherImpl ¶ added in v1.23.0
type BufferEventFlusherImpl struct {
// contains filtered or unexported fields
}
func NewBufferEventFlusher ¶ added in v1.23.0
func NewBufferEventFlusher( shardContext shard.Context, wfContext workflow.Context, mutableState workflow.MutableState, logger log.Logger, ) *BufferEventFlusherImpl
type ConflictResolver ¶
type ConflictResolverImpl ¶
type ConflictResolverImpl struct {
// contains filtered or unexported fields
}
func NewConflictResolver ¶
func NewConflictResolver( shard shard.Context, context workflow.Context, mutableState workflow.MutableState, logger log.Logger, ) *ConflictResolverImpl
func (*ConflictResolverImpl) GetOrRebuildCurrentMutableState ¶ added in v1.23.0
func (r *ConflictResolverImpl) GetOrRebuildCurrentMutableState( ctx context.Context, branchIndex int32, incomingVersion int64, ) (workflow.MutableState, bool, error)
func (*ConflictResolverImpl) GetOrRebuildMutableState ¶ added in v1.23.0
func (r *ConflictResolverImpl) GetOrRebuildMutableState( ctx context.Context, branchIndex int32, ) (workflow.MutableState, bool, error)
type EventBlobs ¶ added in v1.21.0
type EventsReapplier ¶
type EventsReapplier interface { ReapplyEvents( ctx context.Context, ms workflow.MutableState, updateRegistry update.Registry, historyEvents []*historypb.HistoryEvent, runID string, ) ([]*historypb.HistoryEvent, error) }
type EventsReapplierImpl ¶
type EventsReapplierImpl struct {
// contains filtered or unexported fields
}
func NewEventsReapplier ¶
func (*EventsReapplierImpl) ReapplyEvents ¶
func (r *EventsReapplierImpl) ReapplyEvents( ctx context.Context, ms workflow.MutableState, updateRegistry update.Registry, historyEvents []*historypb.HistoryEvent, runID string, ) ([]*historypb.HistoryEvent, error)
type GetOrRebuildMutableStateIn ¶ added in v1.23.0
type GetOrRebuildMutableStateIn struct { BranchIndex int32 // contains filtered or unexported fields }
type HSMStateReplicator ¶ added in v1.25.0
type HSMStateReplicator interface { SyncHSMState( ctx context.Context, request *shard.SyncHSMRequest, ) error }
type HSMStateReplicatorImpl ¶ added in v1.25.0
type HSMStateReplicatorImpl struct {
// contains filtered or unexported fields
}
func NewHSMStateReplicator ¶ added in v1.25.0
func (*HSMStateReplicatorImpl) SyncHSMState ¶ added in v1.25.0
func (r *HSMStateReplicatorImpl) SyncHSMState( ctx context.Context, request *shard.SyncHSMRequest, ) (retError error)
type HistoryImporter ¶ added in v1.23.0
type HistoryImporter interface { ImportWorkflow( ctx context.Context, workflowKey definition.WorkflowKey, versionHistoryItems []*historyspb.VersionHistoryItem, events [][]*historypb.HistoryEvent, token []byte, ) ([]byte, bool, error) }
type HistoryImporterImpl ¶ added in v1.23.0
type HistoryImporterImpl struct {
// contains filtered or unexported fields
}
func NewHistoryImporter ¶ added in v1.23.0
func (*HistoryImporterImpl) ImportWorkflow ¶ added in v1.23.0
func (r *HistoryImporterImpl) ImportWorkflow( ctx context.Context, workflowKey definition.WorkflowKey, versionHistoryItems []*historyspb.VersionHistoryItem, eventsSlice [][]*historypb.HistoryEvent, token []byte, ) (_ []byte, _ bool, retError error)
type HistoryReplicator ¶
type HistoryReplicator interface { ApplyEvents( ctx context.Context, request *historyservice.ReplicateEventsV2Request, ) error // ReplicateHistoryEvents is the batch version of ApplyEvents // NOTE: // 1. all history events should have the same version // 2. all history events should share the same version history ReplicateHistoryEvents( ctx context.Context, workflowKey definition.WorkflowKey, baseExecutionInfo *workflowpb.BaseExecutionInfo, versionHistoryItems []*historyspb.VersionHistoryItem, events [][]*historypb.HistoryEvent, newEvents []*historypb.HistoryEvent, newRunID string, ) error BackfillHistoryEvents(ctx context.Context, request *shard.BackfillHistoryEventsRequest) error }
type HistoryReplicatorImpl ¶
type HistoryReplicatorImpl struct {
// contains filtered or unexported fields
}
func NewHistoryReplicator ¶
func NewHistoryReplicator( shardContext shard.Context, workflowCache wcache.Cache, eventsReapplier EventsReapplier, eventSerializer serialization.Serializer, logger log.Logger, ) *HistoryReplicatorImpl
func (*HistoryReplicatorImpl) ApplyEvents ¶
func (r *HistoryReplicatorImpl) ApplyEvents( ctx context.Context, request *historyservice.ReplicateEventsV2Request, ) (retError error)
func (*HistoryReplicatorImpl) BackfillHistoryEvents ¶ added in v1.25.0
func (r *HistoryReplicatorImpl) BackfillHistoryEvents( ctx context.Context, request *shard.BackfillHistoryEventsRequest, ) error
func (*HistoryReplicatorImpl) ReplicateHistoryEvents ¶ added in v1.23.0
func (r *HistoryReplicatorImpl) ReplicateHistoryEvents( ctx context.Context, workflowKey definition.WorkflowKey, baseExecutionInfo *workflowpb.BaseExecutionInfo, versionHistoryItems []*historyspb.VersionHistoryItem, eventsSlice [][]*historypb.HistoryEvent, newEvents []*historypb.HistoryEvent, newRunID string, ) error
type MockActivityStateReplicator ¶ added in v1.22.0
type MockActivityStateReplicator struct {
// contains filtered or unexported fields
}
MockActivityStateReplicator is a mock of ActivityStateReplicator interface.
func NewMockActivityStateReplicator ¶ added in v1.22.0
func NewMockActivityStateReplicator(ctrl *gomock.Controller) *MockActivityStateReplicator
NewMockActivityStateReplicator creates a new mock instance.
func (*MockActivityStateReplicator) EXPECT ¶ added in v1.22.0
func (m *MockActivityStateReplicator) EXPECT() *MockActivityStateReplicatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockActivityStateReplicator) SyncActivitiesState ¶ added in v1.24.0
func (m *MockActivityStateReplicator) SyncActivitiesState(ctx context.Context, request *historyservice.SyncActivitiesRequest) error
SyncActivitiesState mocks base method.
func (*MockActivityStateReplicator) SyncActivityState ¶ added in v1.22.0
func (m *MockActivityStateReplicator) SyncActivityState(ctx context.Context, request *historyservice.SyncActivityRequest) error
SyncActivityState mocks base method.
type MockActivityStateReplicatorMockRecorder ¶ added in v1.22.0
type MockActivityStateReplicatorMockRecorder struct {
// contains filtered or unexported fields
}
MockActivityStateReplicatorMockRecorder is the mock recorder for MockActivityStateReplicator.
func (*MockActivityStateReplicatorMockRecorder) SyncActivitiesState ¶ added in v1.24.0
func (mr *MockActivityStateReplicatorMockRecorder) SyncActivitiesState(ctx, request interface{}) *gomock.Call
SyncActivitiesState indicates an expected call of SyncActivitiesState.
func (*MockActivityStateReplicatorMockRecorder) SyncActivityState ¶ added in v1.22.0
func (mr *MockActivityStateReplicatorMockRecorder) SyncActivityState(ctx, request interface{}) *gomock.Call
SyncActivityState indicates an expected call of SyncActivityState.
type MockBranchMgr ¶
type MockBranchMgr struct {
// contains filtered or unexported fields
}
MockBranchMgr is a mock of BranchMgr interface.
func NewMockBranchMgr ¶
func NewMockBranchMgr(ctrl *gomock.Controller) *MockBranchMgr
NewMockBranchMgr creates a new mock instance.
func (*MockBranchMgr) Create ¶ added in v1.23.0
func (m *MockBranchMgr) Create(ctx context.Context, incomingVersionHistory *history.VersionHistory, incomingFirstEventID, incomingFirstEventVersion int64) (bool, int32, error)
Create mocks base method.
func (*MockBranchMgr) EXPECT ¶
func (m *MockBranchMgr) EXPECT() *MockBranchMgrMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBranchMgr) GetOrCreate ¶ added in v1.23.0
func (m *MockBranchMgr) GetOrCreate(ctx context.Context, incomingVersionHistory *history.VersionHistory, incomingFirstEventID, incomingFirstEventVersion int64) (bool, int32, error)
GetOrCreate mocks base method.
type MockBranchMgrMockRecorder ¶
type MockBranchMgrMockRecorder struct {
// contains filtered or unexported fields
}
MockBranchMgrMockRecorder is the mock recorder for MockBranchMgr.
func (*MockBranchMgrMockRecorder) Create ¶ added in v1.23.0
func (mr *MockBranchMgrMockRecorder) Create(ctx, incomingVersionHistory, incomingFirstEventID, incomingFirstEventVersion interface{}) *gomock.Call
Create indicates an expected call of Create.
func (*MockBranchMgrMockRecorder) GetOrCreate ¶ added in v1.23.0
func (mr *MockBranchMgrMockRecorder) GetOrCreate(ctx, incomingVersionHistory, incomingFirstEventID, incomingFirstEventVersion interface{}) *gomock.Call
GetOrCreate indicates an expected call of GetOrCreate.
type MockBufferEventFlusher ¶ added in v1.23.0
type MockBufferEventFlusher struct {
// contains filtered or unexported fields
}
MockBufferEventFlusher is a mock of BufferEventFlusher interface.
func NewMockBufferEventFlusher ¶ added in v1.23.0
func NewMockBufferEventFlusher(ctrl *gomock.Controller) *MockBufferEventFlusher
NewMockBufferEventFlusher creates a new mock instance.
func (*MockBufferEventFlusher) EXPECT ¶ added in v1.23.0
func (m *MockBufferEventFlusher) EXPECT() *MockBufferEventFlusherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockBufferEventFlusherMockRecorder ¶ added in v1.23.0
type MockBufferEventFlusherMockRecorder struct {
// contains filtered or unexported fields
}
MockBufferEventFlusherMockRecorder is the mock recorder for MockBufferEventFlusher.
type MockConflictResolver ¶
type MockConflictResolver struct {
// contains filtered or unexported fields
}
MockConflictResolver is a mock of ConflictResolver interface.
func NewMockConflictResolver ¶
func NewMockConflictResolver(ctrl *gomock.Controller) *MockConflictResolver
NewMockConflictResolver creates a new mock instance.
func (*MockConflictResolver) EXPECT ¶
func (m *MockConflictResolver) EXPECT() *MockConflictResolverMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockConflictResolver) GetOrRebuildCurrentMutableState ¶ added in v1.23.0
func (m *MockConflictResolver) GetOrRebuildCurrentMutableState(ctx context.Context, branchIndex int32, incomingVersion int64) (workflow.MutableState, bool, error)
GetOrRebuildCurrentMutableState mocks base method.
func (*MockConflictResolver) GetOrRebuildMutableState ¶ added in v1.23.0
func (m *MockConflictResolver) GetOrRebuildMutableState(ctx context.Context, branchIndex int32) (workflow.MutableState, bool, error)
GetOrRebuildMutableState mocks base method.
type MockConflictResolverMockRecorder ¶
type MockConflictResolverMockRecorder struct {
// contains filtered or unexported fields
}
MockConflictResolverMockRecorder is the mock recorder for MockConflictResolver.
func (*MockConflictResolverMockRecorder) GetOrRebuildCurrentMutableState ¶ added in v1.23.0
func (mr *MockConflictResolverMockRecorder) GetOrRebuildCurrentMutableState(ctx, branchIndex, incomingVersion interface{}) *gomock.Call
GetOrRebuildCurrentMutableState indicates an expected call of GetOrRebuildCurrentMutableState.
func (*MockConflictResolverMockRecorder) GetOrRebuildMutableState ¶ added in v1.23.0
func (mr *MockConflictResolverMockRecorder) GetOrRebuildMutableState(ctx, branchIndex interface{}) *gomock.Call
GetOrRebuildMutableState indicates an expected call of GetOrRebuildMutableState.
type MockEventsReapplier ¶
type MockEventsReapplier struct {
// contains filtered or unexported fields
}
MockEventsReapplier is a mock of EventsReapplier interface.
func NewMockEventsReapplier ¶
func NewMockEventsReapplier(ctrl *gomock.Controller) *MockEventsReapplier
NewMockEventsReapplier creates a new mock instance.
func (*MockEventsReapplier) EXPECT ¶
func (m *MockEventsReapplier) EXPECT() *MockEventsReapplierMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockEventsReapplier) ReapplyEvents ¶
func (m *MockEventsReapplier) ReapplyEvents(ctx context.Context, ms workflow.MutableState, updateRegistry update.Registry, historyEvents []*history.HistoryEvent, runID string) ([]*history.HistoryEvent, error)
ReapplyEvents mocks base method.
type MockEventsReapplierMockRecorder ¶
type MockEventsReapplierMockRecorder struct {
// contains filtered or unexported fields
}
MockEventsReapplierMockRecorder is the mock recorder for MockEventsReapplier.
func (*MockEventsReapplierMockRecorder) ReapplyEvents ¶
func (mr *MockEventsReapplierMockRecorder) ReapplyEvents(ctx, ms, updateRegistry, historyEvents, runID interface{}) *gomock.Call
ReapplyEvents indicates an expected call of ReapplyEvents.
type MockHSMStateReplicator ¶ added in v1.25.0
type MockHSMStateReplicator struct {
// contains filtered or unexported fields
}
MockHSMStateReplicator is a mock of HSMStateReplicator interface.
func NewMockHSMStateReplicator ¶ added in v1.25.0
func NewMockHSMStateReplicator(ctrl *gomock.Controller) *MockHSMStateReplicator
NewMockHSMStateReplicator creates a new mock instance.
func (*MockHSMStateReplicator) EXPECT ¶ added in v1.25.0
func (m *MockHSMStateReplicator) EXPECT() *MockHSMStateReplicatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockHSMStateReplicator) SyncHSMState ¶ added in v1.25.0
func (m *MockHSMStateReplicator) SyncHSMState(ctx context.Context, request *shard.SyncHSMRequest) error
SyncHSMState mocks base method.
type MockHSMStateReplicatorMockRecorder ¶ added in v1.25.0
type MockHSMStateReplicatorMockRecorder struct {
// contains filtered or unexported fields
}
MockHSMStateReplicatorMockRecorder is the mock recorder for MockHSMStateReplicator.
func (*MockHSMStateReplicatorMockRecorder) SyncHSMState ¶ added in v1.25.0
func (mr *MockHSMStateReplicatorMockRecorder) SyncHSMState(ctx, request interface{}) *gomock.Call
SyncHSMState indicates an expected call of SyncHSMState.
type MockStateRebuilder ¶
type MockStateRebuilder struct {
// contains filtered or unexported fields
}
MockStateRebuilder is a mock of StateRebuilder interface.
func NewMockStateRebuilder ¶
func NewMockStateRebuilder(ctrl *gomock.Controller) *MockStateRebuilder
NewMockStateRebuilder creates a new mock instance.
func (*MockStateRebuilder) EXPECT ¶
func (m *MockStateRebuilder) EXPECT() *MockStateRebuilderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStateRebuilder) Rebuild ¶
func (m *MockStateRebuilder) Rebuild(ctx context.Context, now time.Time, baseWorkflowIdentifier definition.WorkflowKey, baseBranchToken []byte, baseLastEventID int64, baseLastEventVersion *int64, targetWorkflowIdentifier definition.WorkflowKey, targetBranchToken []byte, requestID string) (workflow.MutableState, int64, error)
Rebuild mocks base method.
type MockStateRebuilderMockRecorder ¶
type MockStateRebuilderMockRecorder struct {
// contains filtered or unexported fields
}
MockStateRebuilderMockRecorder is the mock recorder for MockStateRebuilder.
func (*MockStateRebuilderMockRecorder) Rebuild ¶
func (mr *MockStateRebuilderMockRecorder) Rebuild(ctx, now, baseWorkflowIdentifier, baseBranchToken, baseLastEventID, baseLastEventVersion, targetWorkflowIdentifier, targetBranchToken, requestID interface{}) *gomock.Call
Rebuild indicates an expected call of Rebuild.
type MockTransactionManager ¶ added in v1.23.0
type MockTransactionManager struct {
// contains filtered or unexported fields
}
MockTransactionManager is a mock of TransactionManager interface.
func NewMockTransactionManager ¶ added in v1.23.0
func NewMockTransactionManager(ctrl *gomock.Controller) *MockTransactionManager
NewMockTransactionManager creates a new mock instance.
func (*MockTransactionManager) BackfillWorkflow ¶ added in v1.23.0
func (m *MockTransactionManager) BackfillWorkflow(ctx context.Context, targetWorkflow Workflow, targetWorkflowEventsSlice ...*persistence.WorkflowEvents) error
BackfillWorkflow mocks base method.
func (*MockTransactionManager) CheckWorkflowExists ¶ added in v1.23.0
func (m *MockTransactionManager) CheckWorkflowExists(ctx context.Context, namespaceID namespace.ID, workflowID, runID string) (bool, error)
CheckWorkflowExists mocks base method.
func (*MockTransactionManager) CreateWorkflow ¶ added in v1.23.0
func (m *MockTransactionManager) CreateWorkflow(ctx context.Context, targetWorkflow Workflow) error
CreateWorkflow mocks base method.
func (*MockTransactionManager) EXPECT ¶ added in v1.23.0
func (m *MockTransactionManager) EXPECT() *MockTransactionManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTransactionManager) GetCurrentWorkflowRunID ¶ added in v1.23.0
func (m *MockTransactionManager) GetCurrentWorkflowRunID(ctx context.Context, namespaceID namespace.ID, workflowID string) (string, error)
GetCurrentWorkflowRunID mocks base method.
func (*MockTransactionManager) LoadWorkflow ¶ added in v1.23.0
func (m *MockTransactionManager) LoadWorkflow(ctx context.Context, namespaceID namespace.ID, workflowID, runID string) (Workflow, error)
LoadWorkflow mocks base method.
func (*MockTransactionManager) UpdateWorkflow ¶ added in v1.23.0
func (m *MockTransactionManager) UpdateWorkflow(ctx context.Context, isWorkflowRebuilt bool, targetWorkflow, newWorkflow Workflow) error
UpdateWorkflow mocks base method.
type MockTransactionManagerMockRecorder ¶ added in v1.23.0
type MockTransactionManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockTransactionManagerMockRecorder is the mock recorder for MockTransactionManager.
func (*MockTransactionManagerMockRecorder) BackfillWorkflow ¶ added in v1.23.0
func (mr *MockTransactionManagerMockRecorder) BackfillWorkflow(ctx, targetWorkflow interface{}, targetWorkflowEventsSlice ...interface{}) *gomock.Call
BackfillWorkflow indicates an expected call of BackfillWorkflow.
func (*MockTransactionManagerMockRecorder) CheckWorkflowExists ¶ added in v1.23.0
func (mr *MockTransactionManagerMockRecorder) CheckWorkflowExists(ctx, namespaceID, workflowID, runID interface{}) *gomock.Call
CheckWorkflowExists indicates an expected call of CheckWorkflowExists.
func (*MockTransactionManagerMockRecorder) CreateWorkflow ¶ added in v1.23.0
func (mr *MockTransactionManagerMockRecorder) CreateWorkflow(ctx, targetWorkflow interface{}) *gomock.Call
CreateWorkflow indicates an expected call of CreateWorkflow.
func (*MockTransactionManagerMockRecorder) GetCurrentWorkflowRunID ¶ added in v1.23.0
func (mr *MockTransactionManagerMockRecorder) GetCurrentWorkflowRunID(ctx, namespaceID, workflowID interface{}) *gomock.Call
GetCurrentWorkflowRunID indicates an expected call of GetCurrentWorkflowRunID.
func (*MockTransactionManagerMockRecorder) LoadWorkflow ¶ added in v1.23.0
func (mr *MockTransactionManagerMockRecorder) LoadWorkflow(ctx, namespaceID, workflowID, runID interface{}) *gomock.Call
LoadWorkflow indicates an expected call of LoadWorkflow.
func (*MockTransactionManagerMockRecorder) UpdateWorkflow ¶ added in v1.23.0
func (mr *MockTransactionManagerMockRecorder) UpdateWorkflow(ctx, isWorkflowRebuilt, targetWorkflow, newWorkflow interface{}) *gomock.Call
UpdateWorkflow indicates an expected call of UpdateWorkflow.
type MockWorkflow ¶
type MockWorkflow struct {
// contains filtered or unexported fields
}
MockWorkflow is a mock of Workflow interface.
func NewMockWorkflow ¶
func NewMockWorkflow(ctrl *gomock.Controller) *MockWorkflow
NewMockWorkflow creates a new mock instance.
func (*MockWorkflow) EXPECT ¶
func (m *MockWorkflow) EXPECT() *MockWorkflowMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockWorkflow) FlushBufferedEvents ¶
func (m *MockWorkflow) FlushBufferedEvents() error
FlushBufferedEvents mocks base method.
func (*MockWorkflow) GetContext ¶
func (m *MockWorkflow) GetContext() workflow.Context
GetContext mocks base method.
func (*MockWorkflow) GetMutableState ¶
func (m *MockWorkflow) GetMutableState() workflow.MutableState
GetMutableState mocks base method.
func (*MockWorkflow) GetReleaseFn ¶
func (m *MockWorkflow) GetReleaseFn() cache.ReleaseCacheFunc
GetReleaseFn mocks base method.
func (*MockWorkflow) GetVectorClock ¶
func (m *MockWorkflow) GetVectorClock() (int64, int64, error)
GetVectorClock mocks base method.
func (*MockWorkflow) HappensAfter ¶
func (m *MockWorkflow) HappensAfter(that Workflow) (bool, error)
HappensAfter mocks base method.
func (*MockWorkflow) SuppressBy ¶
func (m *MockWorkflow) SuppressBy(incomingWorkflow Workflow) (workflow.TransactionPolicy, error)
SuppressBy mocks base method.
type MockWorkflowMockRecorder ¶
type MockWorkflowMockRecorder struct {
// contains filtered or unexported fields
}
MockWorkflowMockRecorder is the mock recorder for MockWorkflow.
func (*MockWorkflowMockRecorder) FlushBufferedEvents ¶
func (mr *MockWorkflowMockRecorder) FlushBufferedEvents() *gomock.Call
FlushBufferedEvents indicates an expected call of FlushBufferedEvents.
func (*MockWorkflowMockRecorder) GetContext ¶
func (mr *MockWorkflowMockRecorder) GetContext() *gomock.Call
GetContext indicates an expected call of GetContext.
func (*MockWorkflowMockRecorder) GetMutableState ¶
func (mr *MockWorkflowMockRecorder) GetMutableState() *gomock.Call
GetMutableState indicates an expected call of GetMutableState.
func (*MockWorkflowMockRecorder) GetReleaseFn ¶
func (mr *MockWorkflowMockRecorder) GetReleaseFn() *gomock.Call
GetReleaseFn indicates an expected call of GetReleaseFn.
func (*MockWorkflowMockRecorder) GetVectorClock ¶
func (mr *MockWorkflowMockRecorder) GetVectorClock() *gomock.Call
GetVectorClock indicates an expected call of GetVectorClock.
func (*MockWorkflowMockRecorder) HappensAfter ¶
func (mr *MockWorkflowMockRecorder) HappensAfter(that interface{}) *gomock.Call
HappensAfter indicates an expected call of HappensAfter.
func (*MockWorkflowMockRecorder) Revive ¶
func (mr *MockWorkflowMockRecorder) Revive() *gomock.Call
Revive indicates an expected call of Revive.
func (*MockWorkflowMockRecorder) SuppressBy ¶
func (mr *MockWorkflowMockRecorder) SuppressBy(incomingWorkflow interface{}) *gomock.Call
SuppressBy indicates an expected call of SuppressBy.
type MockWorkflowResetter ¶
type MockWorkflowResetter struct {
// contains filtered or unexported fields
}
MockWorkflowResetter is a mock of WorkflowResetter interface.
func NewMockWorkflowResetter ¶
func NewMockWorkflowResetter(ctrl *gomock.Controller) *MockWorkflowResetter
NewMockWorkflowResetter creates a new mock instance.
func (*MockWorkflowResetter) EXPECT ¶
func (m *MockWorkflowResetter) EXPECT() *MockWorkflowResetterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockWorkflowResetter) ResetWorkflow ¶
func (m *MockWorkflowResetter) ResetWorkflow(ctx context.Context, namespaceID namespace.ID, workflowID, baseRunID string, baseBranchToken []byte, baseRebuildLastEventID, baseRebuildLastEventVersion, baseNextEventID int64, resetRunID, resetRequestID string, currentWorkflow Workflow, resetReason string, additionalReapplyEvents []*v10.HistoryEvent, resetReapplyExcludeTypes map[v1.ResetReapplyExcludeType]bool) error
ResetWorkflow mocks base method.
type MockWorkflowResetterMockRecorder ¶
type MockWorkflowResetterMockRecorder struct {
// contains filtered or unexported fields
}
MockWorkflowResetterMockRecorder is the mock recorder for MockWorkflowResetter.
func (*MockWorkflowResetterMockRecorder) ResetWorkflow ¶
func (mr *MockWorkflowResetterMockRecorder) ResetWorkflow(ctx, namespaceID, workflowID, baseRunID, baseBranchToken, baseRebuildLastEventID, baseRebuildLastEventVersion, baseNextEventID, resetRunID, resetRequestID, currentWorkflow, resetReason, additionalReapplyEvents, resetReapplyExcludeTypes interface{}) *gomock.Call
ResetWorkflow indicates an expected call of ResetWorkflow.
type MockWorkflowStateReplicator ¶ added in v1.22.0
type MockWorkflowStateReplicator struct {
// contains filtered or unexported fields
}
MockWorkflowStateReplicator is a mock of WorkflowStateReplicator interface.
func NewMockWorkflowStateReplicator ¶ added in v1.22.0
func NewMockWorkflowStateReplicator(ctrl *gomock.Controller) *MockWorkflowStateReplicator
NewMockWorkflowStateReplicator creates a new mock instance.
func (*MockWorkflowStateReplicator) EXPECT ¶ added in v1.22.0
func (m *MockWorkflowStateReplicator) EXPECT() *MockWorkflowStateReplicatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockWorkflowStateReplicator) SyncWorkflowState ¶ added in v1.22.0
func (m *MockWorkflowStateReplicator) SyncWorkflowState(ctx context.Context, request *historyservice.ReplicateWorkflowStateRequest) error
SyncWorkflowState mocks base method.
type MockWorkflowStateReplicatorMockRecorder ¶ added in v1.22.0
type MockWorkflowStateReplicatorMockRecorder struct {
// contains filtered or unexported fields
}
MockWorkflowStateReplicatorMockRecorder is the mock recorder for MockWorkflowStateReplicator.
func (*MockWorkflowStateReplicatorMockRecorder) SyncWorkflowState ¶ added in v1.22.0
func (mr *MockWorkflowStateReplicatorMockRecorder) SyncWorkflowState(ctx, request interface{}) *gomock.Call
SyncWorkflowState indicates an expected call of SyncWorkflowState.
type MocktransactionMgrForExistingWorkflow ¶
type MocktransactionMgrForExistingWorkflow struct {
// contains filtered or unexported fields
}
MocktransactionMgrForExistingWorkflow is a mock of transactionMgrForExistingWorkflow interface.
func NewMocktransactionMgrForExistingWorkflow ¶
func NewMocktransactionMgrForExistingWorkflow(ctrl *gomock.Controller) *MocktransactionMgrForExistingWorkflow
NewMocktransactionMgrForExistingWorkflow creates a new mock instance.
func (*MocktransactionMgrForExistingWorkflow) EXPECT ¶
func (m *MocktransactionMgrForExistingWorkflow) EXPECT() *MocktransactionMgrForExistingWorkflowMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MocktransactionMgrForExistingWorkflowMockRecorder ¶
type MocktransactionMgrForExistingWorkflowMockRecorder struct {
// contains filtered or unexported fields
}
MocktransactionMgrForExistingWorkflowMockRecorder is the mock recorder for MocktransactionMgrForExistingWorkflow.
type MocktransactionMgrForNewWorkflow ¶
type MocktransactionMgrForNewWorkflow struct {
// contains filtered or unexported fields
}
MocktransactionMgrForNewWorkflow is a mock of transactionMgrForNewWorkflow interface.
func NewMocktransactionMgrForNewWorkflow ¶
func NewMocktransactionMgrForNewWorkflow(ctrl *gomock.Controller) *MocktransactionMgrForNewWorkflow
NewMocktransactionMgrForNewWorkflow creates a new mock instance.
func (*MocktransactionMgrForNewWorkflow) EXPECT ¶
func (m *MocktransactionMgrForNewWorkflow) EXPECT() *MocktransactionMgrForNewWorkflowMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MocktransactionMgrForNewWorkflowMockRecorder ¶
type MocktransactionMgrForNewWorkflowMockRecorder struct {
// contains filtered or unexported fields
}
MocktransactionMgrForNewWorkflowMockRecorder is the mock recorder for MocktransactionMgrForNewWorkflow.
type MutableStateInitializationSpec ¶ added in v1.23.0
type MutableStateInitializer ¶ added in v1.23.0
type MutableStateInitializer interface { Initialize( ctx context.Context, workflowKey definition.WorkflowKey, token []byte, ) (Workflow, bool, error) }
type MutableStateInitializerImpl ¶ added in v1.23.0
type MutableStateInitializerImpl struct {
// contains filtered or unexported fields
}
func NewMutableStateInitializer ¶ added in v1.23.0
func (*MutableStateInitializerImpl) Initialize ¶ added in v1.23.0
func (r *MutableStateInitializerImpl) Initialize( ctx context.Context, workflowKey definition.WorkflowKey, token []byte, ) (Workflow, MutableStateInitializationSpec, error)
func (*MutableStateInitializerImpl) InitializeFromDB ¶ added in v1.23.0
func (r *MutableStateInitializerImpl) InitializeFromDB( ctx context.Context, namespaceEntry *namespace.Namespace, workflowKey definition.WorkflowKey, ) (Workflow, MutableStateInitializationSpec, error)
func (*MutableStateInitializerImpl) InitializeFromToken ¶ added in v1.23.0
func (r *MutableStateInitializerImpl) InitializeFromToken( _ context.Context, namespaceEntry *namespace.Namespace, workflowKey definition.WorkflowKey, token []byte, ) (Workflow, MutableStateInitializationSpec, error)
type MutableStateMapper ¶ added in v1.23.0
type MutableStateMapperImpl ¶ added in v1.23.0
type MutableStateMapperImpl struct {
// contains filtered or unexported fields
}
func NewMutableStateMapping ¶ added in v1.23.0
func (*MutableStateMapperImpl) ApplyEvents ¶ added in v1.23.0
func (m *MutableStateMapperImpl) ApplyEvents( ctx context.Context, wfContext workflow.Context, mutableState workflow.MutableState, task replicationTask, ) (workflow.MutableState, workflow.MutableState, error)
func (*MutableStateMapperImpl) CreateHistoryBranch ¶ added in v1.23.0
func (m *MutableStateMapperImpl) CreateHistoryBranch( ctx context.Context, wfContext workflow.Context, mutableState workflow.MutableState, task replicationTask, ) (workflow.MutableState, PrepareHistoryBranchOut, error)
func (*MutableStateMapperImpl) FlushBufferEvents ¶ added in v1.23.0
func (m *MutableStateMapperImpl) FlushBufferEvents( ctx context.Context, wfContext workflow.Context, mutableState workflow.MutableState, task replicationTask, ) (workflow.MutableState, struct{}, error)
func (*MutableStateMapperImpl) GetOrCreateHistoryBranch ¶ added in v1.23.0
func (m *MutableStateMapperImpl) GetOrCreateHistoryBranch( ctx context.Context, wfContext workflow.Context, mutableState workflow.MutableState, task replicationTask, ) (workflow.MutableState, PrepareHistoryBranchOut, error)
func (*MutableStateMapperImpl) GetOrRebuildCurrentMutableState ¶ added in v1.23.0
func (m *MutableStateMapperImpl) GetOrRebuildCurrentMutableState( ctx context.Context, wfContext workflow.Context, mutableState workflow.MutableState, task GetOrRebuildMutableStateIn, ) (workflow.MutableState, bool, error)
func (*MutableStateMapperImpl) GetOrRebuildMutableState ¶ added in v1.23.0
func (m *MutableStateMapperImpl) GetOrRebuildMutableState( ctx context.Context, wfContext workflow.Context, mutableState workflow.MutableState, task GetOrRebuildMutableStateIn, ) (workflow.MutableState, bool, error)
type MutableStateToken ¶ added in v1.23.0
type PrepareHistoryBranchOut ¶ added in v1.23.0
type StateRebuilder ¶
type StateRebuilder interface { Rebuild( ctx context.Context, now time.Time, baseWorkflowIdentifier definition.WorkflowKey, baseBranchToken []byte, baseLastEventID int64, baseLastEventVersion *int64, targetWorkflowIdentifier definition.WorkflowKey, targetBranchToken []byte, requestID string, ) (workflow.MutableState, int64, error) }
type StateRebuilderImpl ¶
type StateRebuilderImpl struct {
// contains filtered or unexported fields
}
func NewStateRebuilder ¶
func NewStateRebuilder( shard shard.Context, logger log.Logger, ) *StateRebuilderImpl
func (*StateRebuilderImpl) Rebuild ¶
func (r *StateRebuilderImpl) Rebuild( ctx context.Context, now time.Time, baseWorkflowIdentifier definition.WorkflowKey, baseBranchToken []byte, baseLastEventID int64, baseLastEventVersion *int64, targetWorkflowIdentifier definition.WorkflowKey, targetBranchToken []byte, requestID string, ) (workflow.MutableState, int64, error)
type TransactionManager ¶ added in v1.23.0
type TransactionManager interface { CreateWorkflow( ctx context.Context, targetWorkflow Workflow, ) error UpdateWorkflow( ctx context.Context, isWorkflowRebuilt bool, targetWorkflow Workflow, newWorkflow Workflow, ) error BackfillWorkflow( ctx context.Context, targetWorkflow Workflow, targetWorkflowEventsSlice ...*persistence.WorkflowEvents, ) error CheckWorkflowExists( ctx context.Context, namespaceID namespace.ID, workflowID string, runID string, ) (bool, error) GetCurrentWorkflowRunID( ctx context.Context, namespaceID namespace.ID, workflowID string, ) (string, error) LoadWorkflow( ctx context.Context, namespaceID namespace.ID, workflowID string, runID string, ) (Workflow, error) }
type Workflow ¶
type Workflow interface { GetContext() workflow.Context GetMutableState() workflow.MutableState GetReleaseFn() wcache.ReleaseCacheFunc GetVectorClock() (int64, int64, error) HappensAfter(that Workflow) (bool, error) Revive() error SuppressBy(incomingWorkflow Workflow) (workflow.TransactionPolicy, error) FlushBufferedEvents() error }
type WorkflowImpl ¶
type WorkflowImpl struct {
// contains filtered or unexported fields
}
func NewWorkflow ¶
func NewWorkflow( clusterMetadata cluster.Metadata, context workflow.Context, mutableState workflow.MutableState, releaseFn wcache.ReleaseCacheFunc, ) *WorkflowImpl
func (*WorkflowImpl) FlushBufferedEvents ¶
func (r *WorkflowImpl) FlushBufferedEvents() error
func (*WorkflowImpl) GetContext ¶
func (r *WorkflowImpl) GetContext() workflow.Context
func (*WorkflowImpl) GetMutableState ¶
func (r *WorkflowImpl) GetMutableState() workflow.MutableState
func (*WorkflowImpl) GetReleaseFn ¶
func (r *WorkflowImpl) GetReleaseFn() wcache.ReleaseCacheFunc
func (*WorkflowImpl) GetVectorClock ¶
func (r *WorkflowImpl) GetVectorClock() (int64, int64, error)
func (*WorkflowImpl) HappensAfter ¶
func (r *WorkflowImpl) HappensAfter( that Workflow, ) (bool, error)
func (*WorkflowImpl) Revive ¶
func (r *WorkflowImpl) Revive() error
func (*WorkflowImpl) SuppressBy ¶
func (r *WorkflowImpl) SuppressBy( incomingWorkflow Workflow, ) (workflow.TransactionPolicy, error)
type WorkflowResetter ¶
type WorkflowResetter interface { ResetWorkflow( ctx context.Context, namespaceID namespace.ID, workflowID string, baseRunID string, baseBranchToken []byte, baseRebuildLastEventID int64, baseRebuildLastEventVersion int64, baseNextEventID int64, resetRunID string, resetRequestID string, currentWorkflow Workflow, resetReason string, additionalReapplyEvents []*historypb.HistoryEvent, resetReapplyExcludeTypes map[enumspb.ResetReapplyExcludeType]bool, ) error }
type WorkflowStateReplicator ¶ added in v1.22.0
type WorkflowStateReplicatorImpl ¶ added in v1.22.0
type WorkflowStateReplicatorImpl struct {
// contains filtered or unexported fields
}
func NewWorkflowStateReplicator ¶ added in v1.22.0
func NewWorkflowStateReplicator( shardContext shard.Context, workflowCache wcache.Cache, eventsReapplier EventsReapplier, eventSerializer serialization.Serializer, logger log.Logger, ) *WorkflowStateReplicatorImpl
func (*WorkflowStateReplicatorImpl) SyncWorkflowState ¶ added in v1.22.0
func (r *WorkflowStateReplicatorImpl) SyncWorkflowState( ctx context.Context, request *historyservice.ReplicateWorkflowStateRequest, ) (retError error)
Source Files ¶
- activity_state_replicator.go
- activity_state_replicator_mock.go
- branch_manager.go
- branch_manager_mock.go
- buffer_event_flusher.go
- buffer_event_flusher_mock.go
- conflict_resolver.go
- conflict_resolver_mock.go
- constants.go
- events_reapplier.go
- events_reapplier_mock.go
- history_importer.go
- history_replicator.go
- hsm_state_replicator.go
- hsm_state_replicator_mock.go
- mutable_state_initializer.go
- mutable_state_mapper.go
- replication_task.go
- resetter.go
- state_rebuilder.go
- state_rebuilder_mock.go
- transaction_manager.go
- transaction_manager_existing_workflow.go
- transaction_manager_existing_workflow_mock.go
- transaction_manager_mock.go
- transaction_manager_new_workflow.go
- transaction_manager_new_workflow_mock.go
- workflow.go
- workflow_mock.go
- workflow_resetter.go
- workflow_resetter_mock.go
- workflow_state_replicator.go
- workflow_state_replicator_mock.go