Documentation ¶
Overview ¶
Package eventhandler is a generated GoMock package.
Package eventhandler is a generated GoMock package.
Package eventhandler is a generated GoMock package.
Package eventhandler is a generated GoMock package.
Index ¶
- type EventImporter
- type HistoryBatch
- type HistoryEventsHandler
- type HistoryPaginatedFetcher
- type HistoryPaginatedFetcherImpl
- func (n *HistoryPaginatedFetcherImpl) GetSingleWorkflowHistoryPaginatedIteratorExclusive(ctx context.Context, remoteClusterName string, namespaceID namespace.ID, ...) collection.Iterator[*HistoryBatch]
- func (n *HistoryPaginatedFetcherImpl) GetSingleWorkflowHistoryPaginatedIteratorInclusive(ctx context.Context, remoteClusterName string, namespaceID namespace.ID, ...) collection.Iterator[*HistoryBatch]
- type MockEventImporter
- type MockEventImporterMockRecorder
- type MockHistoryEventsHandler
- type MockHistoryEventsHandlerMockRecorder
- type MockHistoryPaginatedFetcher
- func (m *MockHistoryPaginatedFetcher) EXPECT() *MockHistoryPaginatedFetcherMockRecorder
- func (m *MockHistoryPaginatedFetcher) GetSingleWorkflowHistoryPaginatedIteratorExclusive(ctx context.Context, remoteClusterName string, namespaceID namespace.ID, ...) collection.Iterator[*HistoryBatch]
- func (m *MockHistoryPaginatedFetcher) GetSingleWorkflowHistoryPaginatedIteratorInclusive(ctx context.Context, remoteClusterName string, namespaceID namespace.ID, ...) collection.Iterator[*HistoryBatch]
- type MockHistoryPaginatedFetcherMockRecorder
- func (mr *MockHistoryPaginatedFetcherMockRecorder) GetSingleWorkflowHistoryPaginatedIteratorExclusive(ctx, remoteClusterName, namespaceID, workflowID, runID, startEventID, ... any) *gomock.Call
- func (mr *MockHistoryPaginatedFetcherMockRecorder) GetSingleWorkflowHistoryPaginatedIteratorInclusive(ctx, remoteClusterName, namespaceID, workflowID, runID, startEventID, ... any) *gomock.Call
- type MockResendHandler
- type MockResendHandlerMockRecorder
- type ResendHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventImporter ¶ added in v1.25.0
type EventImporter interface { ImportHistoryEventsFromBeginning( ctx context.Context, remoteCluster string, workflowKey definition.WorkflowKey, endEventId int64, endEventVersion int64, ) error }
func NewEventImporter ¶ added in v1.25.0
func NewEventImporter( historyFetcher HistoryPaginatedFetcher, engineProvider historyEngineProvider, serializer serialization.Serializer, logger log.Logger, ) EventImporter
type HistoryBatch ¶
type HistoryBatch struct { VersionHistory *historyspb.VersionHistory RawEventBatch *commonpb.DataBlob }
type HistoryEventsHandler ¶
type HistoryEventsHandler interface { HandleHistoryEvents( ctx context.Context, sourceClusterName string, workflowKey definition.WorkflowKey, baseExecutionInfo *workflowpb.BaseExecutionInfo, versionHistoryItems []*historyspb.VersionHistoryItem, historyEvents [][]*historypb.HistoryEvent, newEvents []*historypb.HistoryEvent, newRunID string, ) error }
HistoryEventsHandler is to handle all cases that add history events from remote cluster to current cluster. so it can be used by: 1. ExecutableHistoryTask to replicate events 2. When HistoryResender trying to add events (currently triggered by RetryReplication error, which still need to handle import case)
func NewHistoryEventsHandler ¶
func NewHistoryEventsHandler( clusterMetadata cluster.Metadata, eventImporter EventImporter, shardController shard.Controller, logger log.Logger, ) HistoryEventsHandler
type HistoryPaginatedFetcher ¶
type HistoryPaginatedFetcher interface { GetSingleWorkflowHistoryPaginatedIteratorExclusive( ctx context.Context, remoteClusterName string, namespaceID namespace.ID, workflowID string, runID string, startEventID int64, startEventVersion int64, endEventID int64, endEventVersion int64, ) collection.Iterator[*HistoryBatch] GetSingleWorkflowHistoryPaginatedIteratorInclusive( ctx context.Context, remoteClusterName string, namespaceID namespace.ID, workflowID string, runID string, startEventID int64, startEventVersion int64, endEventID int64, endEventVersion int64, ) collection.Iterator[*HistoryBatch] }
HistoryPaginatedFetcher is the interface for fetching history from remote cluster Start and End event ID is exclusive
func NewHistoryPaginatedFetcher ¶
func NewHistoryPaginatedFetcher( namespaceRegistry namespace.Registry, clientBean client.Bean, serializer serialization.Serializer, logger log.Logger, ) HistoryPaginatedFetcher
type HistoryPaginatedFetcherImpl ¶
type HistoryPaginatedFetcherImpl struct { fx.In NamespaceRegistry namespace.Registry ClientBean client.Bean Serializer serialization.Serializer Logger log.Logger }
func (*HistoryPaginatedFetcherImpl) GetSingleWorkflowHistoryPaginatedIteratorExclusive ¶ added in v1.25.0
func (n *HistoryPaginatedFetcherImpl) GetSingleWorkflowHistoryPaginatedIteratorExclusive( ctx context.Context, remoteClusterName string, namespaceID namespace.ID, workflowID string, runID string, startEventID int64, startEventVersion int64, endEventID int64, endEventVersion int64, ) collection.Iterator[*HistoryBatch]
func (*HistoryPaginatedFetcherImpl) GetSingleWorkflowHistoryPaginatedIteratorInclusive ¶ added in v1.25.0
func (n *HistoryPaginatedFetcherImpl) GetSingleWorkflowHistoryPaginatedIteratorInclusive( ctx context.Context, remoteClusterName string, namespaceID namespace.ID, workflowID string, runID string, startEventID int64, startEventVersion int64, endEventID int64, endEventVersion int64, ) collection.Iterator[*HistoryBatch]
type MockEventImporter ¶ added in v1.25.0
type MockEventImporter struct {
// contains filtered or unexported fields
}
MockEventImporter is a mock of EventImporter interface.
func NewMockEventImporter ¶ added in v1.25.0
func NewMockEventImporter(ctrl *gomock.Controller) *MockEventImporter
NewMockEventImporter creates a new mock instance.
func (*MockEventImporter) EXPECT ¶ added in v1.25.0
func (m *MockEventImporter) EXPECT() *MockEventImporterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockEventImporter) ImportHistoryEventsFromBeginning ¶ added in v1.25.0
func (m *MockEventImporter) ImportHistoryEventsFromBeginning(ctx context.Context, remoteCluster string, workflowKey definition.WorkflowKey, endEventId, endEventVersion int64) error
ImportHistoryEventsFromBeginning mocks base method.
type MockEventImporterMockRecorder ¶ added in v1.25.0
type MockEventImporterMockRecorder struct {
// contains filtered or unexported fields
}
MockEventImporterMockRecorder is the mock recorder for MockEventImporter.
func (*MockEventImporterMockRecorder) ImportHistoryEventsFromBeginning ¶ added in v1.25.0
func (mr *MockEventImporterMockRecorder) ImportHistoryEventsFromBeginning(ctx, remoteCluster, workflowKey, endEventId, endEventVersion any) *gomock.Call
ImportHistoryEventsFromBeginning indicates an expected call of ImportHistoryEventsFromBeginning.
type MockHistoryEventsHandler ¶
type MockHistoryEventsHandler struct {
// contains filtered or unexported fields
}
MockHistoryEventsHandler is a mock of HistoryEventsHandler interface.
func NewMockHistoryEventsHandler ¶
func NewMockHistoryEventsHandler(ctrl *gomock.Controller) *MockHistoryEventsHandler
NewMockHistoryEventsHandler creates a new mock instance.
func (*MockHistoryEventsHandler) EXPECT ¶
func (m *MockHistoryEventsHandler) EXPECT() *MockHistoryEventsHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockHistoryEventsHandler) HandleHistoryEvents ¶
func (m *MockHistoryEventsHandler) HandleHistoryEvents(ctx context.Context, sourceClusterName string, workflowKey definition.WorkflowKey, baseExecutionInfo *workflow.BaseExecutionInfo, versionHistoryItems []*history0.VersionHistoryItem, historyEvents [][]*history.HistoryEvent, newEvents []*history.HistoryEvent, newRunID string) error
HandleHistoryEvents mocks base method.
type MockHistoryEventsHandlerMockRecorder ¶
type MockHistoryEventsHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockHistoryEventsHandlerMockRecorder is the mock recorder for MockHistoryEventsHandler.
func (*MockHistoryEventsHandlerMockRecorder) HandleHistoryEvents ¶
func (mr *MockHistoryEventsHandlerMockRecorder) HandleHistoryEvents(ctx, sourceClusterName, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents, newRunID any) *gomock.Call
HandleHistoryEvents indicates an expected call of HandleHistoryEvents.
type MockHistoryPaginatedFetcher ¶
type MockHistoryPaginatedFetcher struct {
// contains filtered or unexported fields
}
MockHistoryPaginatedFetcher is a mock of HistoryPaginatedFetcher interface.
func NewMockHistoryPaginatedFetcher ¶
func NewMockHistoryPaginatedFetcher(ctrl *gomock.Controller) *MockHistoryPaginatedFetcher
NewMockHistoryPaginatedFetcher creates a new mock instance.
func (*MockHistoryPaginatedFetcher) EXPECT ¶
func (m *MockHistoryPaginatedFetcher) EXPECT() *MockHistoryPaginatedFetcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockHistoryPaginatedFetcher) GetSingleWorkflowHistoryPaginatedIteratorExclusive ¶ added in v1.25.0
func (m *MockHistoryPaginatedFetcher) GetSingleWorkflowHistoryPaginatedIteratorExclusive(ctx context.Context, remoteClusterName string, namespaceID namespace.ID, workflowID, runID string, startEventID, startEventVersion, endEventID, endEventVersion int64) collection.Iterator[*HistoryBatch]
GetSingleWorkflowHistoryPaginatedIteratorExclusive mocks base method.
func (*MockHistoryPaginatedFetcher) GetSingleWorkflowHistoryPaginatedIteratorInclusive ¶ added in v1.25.0
func (m *MockHistoryPaginatedFetcher) GetSingleWorkflowHistoryPaginatedIteratorInclusive(ctx context.Context, remoteClusterName string, namespaceID namespace.ID, workflowID, runID string, startEventID, startEventVersion, endEventID, endEventVersion int64) collection.Iterator[*HistoryBatch]
GetSingleWorkflowHistoryPaginatedIteratorInclusive mocks base method.
type MockHistoryPaginatedFetcherMockRecorder ¶
type MockHistoryPaginatedFetcherMockRecorder struct {
// contains filtered or unexported fields
}
MockHistoryPaginatedFetcherMockRecorder is the mock recorder for MockHistoryPaginatedFetcher.
func (*MockHistoryPaginatedFetcherMockRecorder) GetSingleWorkflowHistoryPaginatedIteratorExclusive ¶ added in v1.25.0
func (mr *MockHistoryPaginatedFetcherMockRecorder) GetSingleWorkflowHistoryPaginatedIteratorExclusive(ctx, remoteClusterName, namespaceID, workflowID, runID, startEventID, startEventVersion, endEventID, endEventVersion any) *gomock.Call
GetSingleWorkflowHistoryPaginatedIteratorExclusive indicates an expected call of GetSingleWorkflowHistoryPaginatedIteratorExclusive.
func (*MockHistoryPaginatedFetcherMockRecorder) GetSingleWorkflowHistoryPaginatedIteratorInclusive ¶ added in v1.25.0
func (mr *MockHistoryPaginatedFetcherMockRecorder) GetSingleWorkflowHistoryPaginatedIteratorInclusive(ctx, remoteClusterName, namespaceID, workflowID, runID, startEventID, startEventVersion, endEventID, endEventVersion any) *gomock.Call
GetSingleWorkflowHistoryPaginatedIteratorInclusive indicates an expected call of GetSingleWorkflowHistoryPaginatedIteratorInclusive.
type MockResendHandler ¶ added in v1.25.0
type MockResendHandler struct {
// contains filtered or unexported fields
}
MockResendHandler is a mock of ResendHandler interface.
func NewMockResendHandler ¶ added in v1.25.0
func NewMockResendHandler(ctrl *gomock.Controller) *MockResendHandler
NewMockResendHandler creates a new mock instance.
func (*MockResendHandler) EXPECT ¶ added in v1.25.0
func (m *MockResendHandler) EXPECT() *MockResendHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockResendHandler) ResendHistoryEvents ¶ added in v1.25.0
func (m *MockResendHandler) ResendHistoryEvents(ctx context.Context, remoteClusterName string, namespaceID namespace.ID, workflowID, runID string, startEventID, startEventVersion, endEventID, endEventVersion int64) error
ResendHistoryEvents mocks base method.
type MockResendHandlerMockRecorder ¶ added in v1.25.0
type MockResendHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockResendHandlerMockRecorder is the mock recorder for MockResendHandler.
func (*MockResendHandlerMockRecorder) ResendHistoryEvents ¶ added in v1.25.0
func (mr *MockResendHandlerMockRecorder) ResendHistoryEvents(ctx, remoteClusterName, namespaceID, workflowID, runID, startEventID, startEventVersion, endEventID, endEventVersion any) *gomock.Call
ResendHistoryEvents indicates an expected call of ResendHistoryEvents.
type ResendHandler ¶ added in v1.25.0
type ResendHandler interface { ResendHistoryEvents( ctx context.Context, remoteClusterName string, namespaceID namespace.ID, workflowID string, runID string, startEventID int64, startEventVersion int64, endEventID int64, endEventVersion int64, ) error }
func NewResendHandler ¶ added in v1.25.0
func NewResendHandler( namespaceRegistry namespace.Registry, clientBean client.Bean, serializer serialization.Serializer, clusterMetadata cluster.Metadata, historyEngineProvider func(ctx context.Context, namespaceId namespace.ID, workflowId string) (shard.Engine, error), remoteHistoryFetcher HistoryPaginatedFetcher, importer EventImporter, logger log.Logger, config *configs.Config, ) ResendHandler