Documentation ¶
Overview ¶
Package replication is a generated GoMock package.
Package replication is a generated GoMock package.
Package replication is a generated GoMock package.
Package replication is a generated GoMock package.
Package replication is a generated GoMock package.
Index ¶
- Variables
- func NewTaskProcessorManager(config *configs.Config, shard shard.Context, engine shard.Engine, ...) *taskProcessorFactoryImpl
- type AckManager
- type DLQHandler
- type MockAckManager
- func (m *MockAckManager) EXPECT() *MockAckManagerMockRecorder
- func (m *MockAckManager) GetMaxTaskID() int64
- func (m *MockAckManager) GetTask(ctx context.Context, taskInfo *repication.ReplicationTaskInfo) (*repication.ReplicationTask, error)
- func (m *MockAckManager) GetTasks(ctx context.Context, pollingCluster string, queryMessageID int64) (*repication.ReplicationMessages, error)
- func (m *MockAckManager) NotifyNewTasks(tasks []tasks.Task)
- type MockAckManagerMockRecorder
- func (mr *MockAckManagerMockRecorder) GetMaxTaskID() *gomock.Call
- func (mr *MockAckManagerMockRecorder) GetTask(ctx, taskInfo interface{}) *gomock.Call
- func (mr *MockAckManagerMockRecorder) GetTasks(ctx, pollingCluster, queryMessageID interface{}) *gomock.Call
- func (mr *MockAckManagerMockRecorder) NotifyNewTasks(tasks interface{}) *gomock.Call
- type MockDLQHandler
- func (m *MockDLQHandler) EXPECT() *MockDLQHandlerMockRecorder
- func (m *MockDLQHandler) GetMessages(ctx context.Context, sourceCluster string, lastMessageID int64, pageSize int, ...) ([]*repication.ReplicationTask, []byte, error)
- func (m *MockDLQHandler) MergeMessages(ctx context.Context, sourceCluster string, lastMessageID int64, pageSize int, ...) ([]byte, error)
- func (m *MockDLQHandler) PurgeMessages(ctx context.Context, sourceCluster string, lastMessageID int64) error
- type MockDLQHandlerMockRecorder
- func (mr *MockDLQHandlerMockRecorder) GetMessages(ctx, sourceCluster, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
- func (mr *MockDLQHandlerMockRecorder) MergeMessages(ctx, sourceCluster, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
- func (mr *MockDLQHandlerMockRecorder) PurgeMessages(ctx, sourceCluster, lastMessageID interface{}) *gomock.Call
- type MockTaskExecutor
- type MockTaskExecutorMockRecorder
- type MockTaskFetcherFactory
- type MockTaskFetcherFactoryMockRecorder
- type MockTaskProcessor
- type MockTaskProcessorMockRecorder
- type MocktaskFetcher
- type MocktaskFetcherMockRecorder
- type TaskExecutor
- type TaskExecutorParams
- type TaskExecutorProvider
- type TaskFetcherFactory
- type TaskProcessor
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnknownReplicationTask is the error to indicate unknown replication task type ErrUnknownReplicationTask = serviceerror.NewInvalidArgument("unknown replication task") )
var Module = fx.Options( fx.Provide(ReplicationTaskFetcherFactoryProvider), fx.Provide(ReplicationTaskExecutorProvider), )
Functions ¶
func NewTaskProcessorManager ¶
func NewTaskProcessorManager( config *configs.Config, shard shard.Context, engine shard.Engine, workflowCache workflow.Cache, workflowDeleteManager workflow.DeleteManager, clientBean client.Bean, eventSerializer serialization.Serializer, replicationTaskFetcherFactory TaskFetcherFactory, taskExecutorProvider TaskExecutorProvider, ) *taskProcessorFactoryImpl
Types ¶
type AckManager ¶
type AckManager interface { NotifyNewTasks(tasks []tasks.Task) GetMaxTaskID() int64 GetTasks(ctx context.Context, pollingCluster string, queryMessageID int64) (*replicationspb.ReplicationMessages, error) GetTask(ctx context.Context, taskInfo *replicationspb.ReplicationTaskInfo) (*replicationspb.ReplicationTask, error) }
func NewAckManager ¶
func NewAckManager( shard shard.Context, historyCache workflow.Cache, executionMgr persistence.ExecutionManager, logger log.Logger, ) AckManager
type DLQHandler ¶
type DLQHandler interface { GetMessages( ctx context.Context, sourceCluster string, lastMessageID int64, pageSize int, pageToken []byte, ) ([]*replicationspb.ReplicationTask, []byte, error) PurgeMessages( ctx context.Context, sourceCluster string, lastMessageID int64, ) error MergeMessages( ctx context.Context, sourceCluster string, lastMessageID int64, pageSize int, pageToken []byte, ) ([]byte, error) }
DLQHandler is the interface handles replication DLQ messages
func NewLazyDLQHandler ¶
func NewLazyDLQHandler( shard shard.Context, deleteManager workflow.DeleteManager, workflowCache workflow.Cache, clientBean client.Bean, taskExecutorProvider TaskExecutorProvider, ) DLQHandler
type MockAckManager ¶
type MockAckManager struct {
// contains filtered or unexported fields
}
MockAckManager is a mock of AckManager interface.
func NewMockAckManager ¶
func NewMockAckManager(ctrl *gomock.Controller) *MockAckManager
NewMockAckManager creates a new mock instance.
func (*MockAckManager) EXPECT ¶
func (m *MockAckManager) EXPECT() *MockAckManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAckManager) GetMaxTaskID ¶
func (m *MockAckManager) GetMaxTaskID() int64
GetMaxTaskID mocks base method.
func (*MockAckManager) GetTask ¶
func (m *MockAckManager) GetTask(ctx context.Context, taskInfo *repication.ReplicationTaskInfo) (*repication.ReplicationTask, error)
GetTask mocks base method.
func (*MockAckManager) GetTasks ¶
func (m *MockAckManager) GetTasks(ctx context.Context, pollingCluster string, queryMessageID int64) (*repication.ReplicationMessages, error)
GetTasks mocks base method.
func (*MockAckManager) NotifyNewTasks ¶
func (m *MockAckManager) NotifyNewTasks(tasks []tasks.Task)
NotifyNewTasks mocks base method.
type MockAckManagerMockRecorder ¶
type MockAckManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockAckManagerMockRecorder is the mock recorder for MockAckManager.
func (*MockAckManagerMockRecorder) GetMaxTaskID ¶
func (mr *MockAckManagerMockRecorder) GetMaxTaskID() *gomock.Call
GetMaxTaskID indicates an expected call of GetMaxTaskID.
func (*MockAckManagerMockRecorder) GetTask ¶
func (mr *MockAckManagerMockRecorder) GetTask(ctx, taskInfo interface{}) *gomock.Call
GetTask indicates an expected call of GetTask.
func (*MockAckManagerMockRecorder) GetTasks ¶
func (mr *MockAckManagerMockRecorder) GetTasks(ctx, pollingCluster, queryMessageID interface{}) *gomock.Call
GetTasks indicates an expected call of GetTasks.
func (*MockAckManagerMockRecorder) NotifyNewTasks ¶
func (mr *MockAckManagerMockRecorder) NotifyNewTasks(tasks interface{}) *gomock.Call
NotifyNewTasks indicates an expected call of NotifyNewTasks.
type MockDLQHandler ¶
type MockDLQHandler struct {
// contains filtered or unexported fields
}
MockDLQHandler is a mock of DLQHandler interface.
func NewMockDLQHandler ¶
func NewMockDLQHandler(ctrl *gomock.Controller) *MockDLQHandler
NewMockDLQHandler creates a new mock instance.
func (*MockDLQHandler) EXPECT ¶
func (m *MockDLQHandler) EXPECT() *MockDLQHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockDLQHandler) GetMessages ¶
func (m *MockDLQHandler) GetMessages(ctx context.Context, sourceCluster string, lastMessageID int64, pageSize int, pageToken []byte) ([]*repication.ReplicationTask, []byte, error)
GetMessages mocks base method.
func (*MockDLQHandler) MergeMessages ¶
func (m *MockDLQHandler) MergeMessages(ctx context.Context, sourceCluster string, lastMessageID int64, pageSize int, pageToken []byte) ([]byte, error)
MergeMessages mocks base method.
func (*MockDLQHandler) PurgeMessages ¶
func (m *MockDLQHandler) PurgeMessages(ctx context.Context, sourceCluster string, lastMessageID int64) error
PurgeMessages mocks base method.
type MockDLQHandlerMockRecorder ¶
type MockDLQHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockDLQHandlerMockRecorder is the mock recorder for MockDLQHandler.
func (*MockDLQHandlerMockRecorder) GetMessages ¶
func (mr *MockDLQHandlerMockRecorder) GetMessages(ctx, sourceCluster, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
GetMessages indicates an expected call of GetMessages.
func (*MockDLQHandlerMockRecorder) MergeMessages ¶
func (mr *MockDLQHandlerMockRecorder) MergeMessages(ctx, sourceCluster, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
MergeMessages indicates an expected call of MergeMessages.
func (*MockDLQHandlerMockRecorder) PurgeMessages ¶
func (mr *MockDLQHandlerMockRecorder) PurgeMessages(ctx, sourceCluster, lastMessageID interface{}) *gomock.Call
PurgeMessages indicates an expected call of PurgeMessages.
type MockTaskExecutor ¶
type MockTaskExecutor struct {
// contains filtered or unexported fields
}
MockTaskExecutor is a mock of TaskExecutor interface.
func NewMockTaskExecutor ¶
func NewMockTaskExecutor(ctrl *gomock.Controller) *MockTaskExecutor
NewMockTaskExecutor creates a new mock instance.
func (*MockTaskExecutor) EXPECT ¶
func (m *MockTaskExecutor) EXPECT() *MockTaskExecutorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTaskExecutor) Execute ¶
func (m *MockTaskExecutor) Execute(replicationTask *repication.ReplicationTask, forceApply bool) (int, error)
Execute mocks base method.
type MockTaskExecutorMockRecorder ¶
type MockTaskExecutorMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskExecutorMockRecorder is the mock recorder for MockTaskExecutor.
func (*MockTaskExecutorMockRecorder) Execute ¶
func (mr *MockTaskExecutorMockRecorder) Execute(replicationTask, forceApply interface{}) *gomock.Call
Execute indicates an expected call of Execute.
type MockTaskFetcherFactory ¶
type MockTaskFetcherFactory struct {
// contains filtered or unexported fields
}
MockTaskFetcherFactory is a mock of TaskFetcherFactory interface.
func NewMockTaskFetcherFactory ¶
func NewMockTaskFetcherFactory(ctrl *gomock.Controller) *MockTaskFetcherFactory
NewMockTaskFetcherFactory creates a new mock instance.
func (*MockTaskFetcherFactory) EXPECT ¶
func (m *MockTaskFetcherFactory) EXPECT() *MockTaskFetcherFactoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTaskFetcherFactory) GetOrCreateFetcher ¶
func (m *MockTaskFetcherFactory) GetOrCreateFetcher(clusterName string) taskFetcher
GetOrCreateFetcher mocks base method.
func (*MockTaskFetcherFactory) Start ¶
func (m *MockTaskFetcherFactory) Start()
Start mocks base method.
func (*MockTaskFetcherFactory) Stop ¶
func (m *MockTaskFetcherFactory) Stop()
Stop mocks base method.
type MockTaskFetcherFactoryMockRecorder ¶
type MockTaskFetcherFactoryMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskFetcherFactoryMockRecorder is the mock recorder for MockTaskFetcherFactory.
func (*MockTaskFetcherFactoryMockRecorder) GetOrCreateFetcher ¶
func (mr *MockTaskFetcherFactoryMockRecorder) GetOrCreateFetcher(clusterName interface{}) *gomock.Call
GetOrCreateFetcher indicates an expected call of GetOrCreateFetcher.
func (*MockTaskFetcherFactoryMockRecorder) Start ¶
func (mr *MockTaskFetcherFactoryMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockTaskFetcherFactoryMockRecorder) Stop ¶
func (mr *MockTaskFetcherFactoryMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type MockTaskProcessor ¶
type MockTaskProcessor struct {
// contains filtered or unexported fields
}
MockTaskProcessor is a mock of TaskProcessor interface.
func NewMockTaskProcessor ¶
func NewMockTaskProcessor(ctrl *gomock.Controller) *MockTaskProcessor
NewMockTaskProcessor creates a new mock instance.
func (*MockTaskProcessor) EXPECT ¶
func (m *MockTaskProcessor) EXPECT() *MockTaskProcessorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockTaskProcessorMockRecorder ¶
type MockTaskProcessorMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskProcessorMockRecorder is the mock recorder for MockTaskProcessor.
func (*MockTaskProcessorMockRecorder) Start ¶
func (mr *MockTaskProcessorMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockTaskProcessorMockRecorder) Stop ¶
func (mr *MockTaskProcessorMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type MocktaskFetcher ¶
type MocktaskFetcher struct {
// contains filtered or unexported fields
}
MocktaskFetcher is a mock of taskFetcher interface.
func NewMocktaskFetcher ¶
func NewMocktaskFetcher(ctrl *gomock.Controller) *MocktaskFetcher
NewMocktaskFetcher creates a new mock instance.
func (*MocktaskFetcher) EXPECT ¶
func (m *MocktaskFetcher) EXPECT() *MocktaskFetcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MocktaskFetcherMockRecorder ¶
type MocktaskFetcherMockRecorder struct {
// contains filtered or unexported fields
}
MocktaskFetcherMockRecorder is the mock recorder for MocktaskFetcher.
func (*MocktaskFetcherMockRecorder) Start ¶
func (mr *MocktaskFetcherMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MocktaskFetcherMockRecorder) Stop ¶
func (mr *MocktaskFetcherMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type TaskExecutor ¶
type TaskExecutor interface {
Execute(replicationTask *replicationspb.ReplicationTask, forceApply bool) (int, error)
}
func NewTaskExecutor ¶
func NewTaskExecutor( remoteCluster string, shard shard.Context, nDCHistoryResender xdc.NDCHistoryResender, historyEngine shard.Engine, deleteManager workflow.DeleteManager, workflowCache workflow.Cache, ) TaskExecutor
NewTaskExecutor creates a replication task executor The executor uses by 1) DLQ replication task handler 2) history replication task processor
type TaskExecutorParams ¶
type TaskExecutorProvider ¶
type TaskExecutorProvider func(params TaskExecutorParams) TaskExecutor
func ReplicationTaskExecutorProvider ¶
func ReplicationTaskExecutorProvider() TaskExecutorProvider
type TaskFetcherFactory ¶
type TaskFetcherFactory interface { common.Daemon GetOrCreateFetcher(clusterName string) taskFetcher }
TaskFetcherFactory is a group of fetchers, one per source DC.
type TaskProcessor ¶
TaskProcessor is the interface for task processor
func NewTaskProcessor ¶
func NewTaskProcessor( shard shard.Context, historyEngine shard.Engine, config *configs.Config, metricsClient metrics.Client, replicationTaskFetcher taskFetcher, replicationTaskExecutor TaskExecutor, eventSerializer serialization.Serializer, ) TaskProcessor
NewTaskProcessor creates a new replication task processor.