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
- type DLQHandler
- type MockDLQHandler
- func (m *MockDLQHandler) EXPECT() *MockDLQHandlerMockRecorder
- 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
- func (m *MockDLQHandler) ReadMessages(ctx context.Context, sourceCluster string, lastMessageID int64, pageSize int, ...) ([]*types.ReplicationTask, []*types.ReplicationTaskInfo, []byte, error)
- type MockDLQHandlerMockRecorder
- func (mr *MockDLQHandlerMockRecorder) MergeMessages(ctx, sourceCluster, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
- func (mr *MockDLQHandlerMockRecorder) PurgeMessages(ctx, sourceCluster, lastMessageID interface{}) *gomock.Call
- func (mr *MockDLQHandlerMockRecorder) ReadMessages(ctx, sourceCluster, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
- type MockTaskAckManager
- func (m *MockTaskAckManager) EXPECT() *MockTaskAckManagerMockRecorder
- func (m *MockTaskAckManager) GetTask(ctx context.Context, taskInfo *types.ReplicationTaskInfo) (*types.ReplicationTask, error)
- func (m *MockTaskAckManager) GetTasks(ctx context.Context, pollingCluster string, lastReadTaskID int64) (*types.ReplicationMessages, error)
- type MockTaskAckManagerMockRecorder
- type MockTaskExecutor
- type MockTaskExecutorMockRecorder
- type MockTaskFetcher
- func (m *MockTaskFetcher) EXPECT() *MockTaskFetcherMockRecorder
- func (m *MockTaskFetcher) GetRateLimiter() *quotas.DynamicRateLimiter
- func (m *MockTaskFetcher) GetRequestChan() chan<- *request
- func (m *MockTaskFetcher) GetSourceCluster() string
- func (m *MockTaskFetcher) Start()
- func (m *MockTaskFetcher) Stop()
- type MockTaskFetcherMockRecorder
- func (mr *MockTaskFetcherMockRecorder) GetRateLimiter() *gomock.Call
- func (mr *MockTaskFetcherMockRecorder) GetRequestChan() *gomock.Call
- func (mr *MockTaskFetcherMockRecorder) GetSourceCluster() *gomock.Call
- func (mr *MockTaskFetcherMockRecorder) Start() *gomock.Call
- func (mr *MockTaskFetcherMockRecorder) Stop() *gomock.Call
- type MockTaskFetchers
- type MockTaskFetchersMockRecorder
- type MockTaskProcessor
- type MockTaskProcessorMockRecorder
- type TaskAckManager
- type TaskExecutor
- type TaskFetcher
- type TaskFetchers
- type TaskProcessor
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnknownReplicationTask is the error to indicate unknown replication task type ErrUnknownReplicationTask = &types.BadRequestError{Message: "unknown replication task"} )
Functions ¶
This section is empty.
Types ¶
type DLQHandler ¶
type DLQHandler interface { ReadMessages( ctx context.Context, sourceCluster string, lastMessageID int64, pageSize int, pageToken []byte, ) ([]*types.ReplicationTask, []*types.ReplicationTaskInfo, []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 NewDLQHandler ¶
func NewDLQHandler( shard shard.Context, taskExecutors map[string]TaskExecutor, ) DLQHandler
NewDLQHandler initialize the replication message DLQ handler
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) 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
func (*MockDLQHandler) ReadMessages ¶
func (m *MockDLQHandler) ReadMessages(ctx context.Context, sourceCluster string, lastMessageID int64, pageSize int, pageToken []byte) ([]*types.ReplicationTask, []*types.ReplicationTaskInfo, []byte, error)
ReadMessages mocks base method
type MockDLQHandlerMockRecorder ¶
type MockDLQHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockDLQHandlerMockRecorder is the mock recorder for MockDLQHandler
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
func (*MockDLQHandlerMockRecorder) ReadMessages ¶
func (mr *MockDLQHandlerMockRecorder) ReadMessages(ctx, sourceCluster, lastMessageID, pageSize, pageToken interface{}) *gomock.Call
ReadMessages indicates an expected call of ReadMessages
type MockTaskAckManager ¶ added in v0.15.0
type MockTaskAckManager struct {
// contains filtered or unexported fields
}
MockTaskAckManager is a mock of TaskAckManager interface
func NewMockTaskAckManager ¶ added in v0.15.0
func NewMockTaskAckManager(ctrl *gomock.Controller) *MockTaskAckManager
NewMockTaskAckManager creates a new mock instance
func (*MockTaskAckManager) EXPECT ¶ added in v0.15.0
func (m *MockTaskAckManager) EXPECT() *MockTaskAckManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockTaskAckManager) GetTask ¶ added in v0.15.0
func (m *MockTaskAckManager) GetTask(ctx context.Context, taskInfo *types.ReplicationTaskInfo) (*types.ReplicationTask, error)
GetTask mocks base method
func (*MockTaskAckManager) GetTasks ¶ added in v0.15.0
func (m *MockTaskAckManager) GetTasks(ctx context.Context, pollingCluster string, lastReadTaskID int64) (*types.ReplicationMessages, error)
GetTasks mocks base method
type MockTaskAckManagerMockRecorder ¶ added in v0.15.0
type MockTaskAckManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskAckManagerMockRecorder is the mock recorder for MockTaskAckManager
func (*MockTaskAckManagerMockRecorder) GetTask ¶ added in v0.15.0
func (mr *MockTaskAckManagerMockRecorder) GetTask(ctx, taskInfo interface{}) *gomock.Call
GetTask indicates an expected call of GetTask
func (*MockTaskAckManagerMockRecorder) GetTasks ¶ added in v0.15.0
func (mr *MockTaskAckManagerMockRecorder) GetTasks(ctx, pollingCluster, lastReadTaskID interface{}) *gomock.Call
GetTasks indicates an expected call of GetTasks
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
type MockTaskExecutorMockRecorder ¶
type MockTaskExecutorMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskExecutorMockRecorder is the mock recorder for MockTaskExecutor
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
func (*MockTaskFetcher) GetRateLimiter ¶ added in v0.14.0
func (m *MockTaskFetcher) GetRateLimiter() *quotas.DynamicRateLimiter
GetRateLimiter mocks base method
func (*MockTaskFetcher) GetRequestChan ¶
func (m *MockTaskFetcher) GetRequestChan() chan<- *request
GetRequestChan mocks base method
func (*MockTaskFetcher) GetSourceCluster ¶
func (m *MockTaskFetcher) GetSourceCluster() string
GetSourceCluster mocks base method
type MockTaskFetcherMockRecorder ¶
type MockTaskFetcherMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskFetcherMockRecorder is the mock recorder for MockTaskFetcher
func (*MockTaskFetcherMockRecorder) GetRateLimiter ¶ added in v0.14.0
func (mr *MockTaskFetcherMockRecorder) GetRateLimiter() *gomock.Call
GetRateLimiter indicates an expected call of GetRateLimiter
func (*MockTaskFetcherMockRecorder) GetRequestChan ¶
func (mr *MockTaskFetcherMockRecorder) GetRequestChan() *gomock.Call
GetRequestChan indicates an expected call of GetRequestChan
func (*MockTaskFetcherMockRecorder) GetSourceCluster ¶
func (mr *MockTaskFetcherMockRecorder) GetSourceCluster() *gomock.Call
GetSourceCluster indicates an expected call of GetSourceCluster
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 MockTaskFetchers ¶
type MockTaskFetchers struct {
// contains filtered or unexported fields
}
MockTaskFetchers is a mock of TaskFetchers interface
func NewMockTaskFetchers ¶
func NewMockTaskFetchers(ctrl *gomock.Controller) *MockTaskFetchers
NewMockTaskFetchers creates a new mock instance
func (*MockTaskFetchers) EXPECT ¶
func (m *MockTaskFetchers) EXPECT() *MockTaskFetchersMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockTaskFetchers) GetFetchers ¶
func (m *MockTaskFetchers) GetFetchers() []TaskFetcher
GetFetchers mocks base method
type MockTaskFetchersMockRecorder ¶
type MockTaskFetchersMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskFetchersMockRecorder is the mock recorder for MockTaskFetchers
func (*MockTaskFetchersMockRecorder) GetFetchers ¶
func (mr *MockTaskFetchersMockRecorder) GetFetchers() *gomock.Call
GetFetchers indicates an expected call of GetFetchers
func (*MockTaskFetchersMockRecorder) Start ¶
func (mr *MockTaskFetchersMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockTaskFetchersMockRecorder) Stop ¶
func (mr *MockTaskFetchersMockRecorder) 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 TaskAckManager ¶ added in v0.15.0
type TaskAckManager interface { GetTask( ctx ctx.Context, taskInfo *types.ReplicationTaskInfo, ) (*types.ReplicationTask, error) GetTasks( ctx ctx.Context, pollingCluster string, lastReadTaskID int64, ) (*types.ReplicationMessages, error) }
TaskAckManager is the ack manager for replication tasks
func NewTaskAckManager ¶ added in v0.15.0
func NewTaskAckManager( shard shard.Context, executionCache *exec.Cache, ) TaskAckManager
NewTaskAckManager initializes a new replication task ack manager
type TaskExecutor ¶
type TaskExecutor interface {
// contains filtered or unexported methods
}
TaskExecutor is the executor for replication task
func NewTaskExecutor ¶
func NewTaskExecutor( shard shard.Context, domainCache cache.DomainCache, historyResender ndc.HistoryResender, historyEngine engine.Engine, metricsClient metrics.Client, logger log.Logger, ) TaskExecutor
NewTaskExecutor creates an replication task executor The executor uses by 1) DLQ replication task handler 2) history replication task processor
type TaskFetcher ¶
type TaskFetcher interface { common.Daemon GetSourceCluster() string GetRequestChan() chan<- *request GetRateLimiter() *quotas.DynamicRateLimiter }
TaskFetcher is responsible for fetching replication messages from remote DC.
type TaskFetchers ¶
type TaskFetchers interface { common.Daemon GetFetchers() []TaskFetcher }
TaskFetchers is a group of fetchers, one per source DC.
type TaskProcessor ¶
TaskProcessor is responsible for processing replication tasks for a shard.
func NewTaskProcessor ¶
func NewTaskProcessor( shard shard.Context, historyEngine engine.Engine, config *config.Config, metricsClient metrics.Client, taskFetcher TaskFetcher, taskExecutor TaskExecutor, ) TaskProcessor
NewTaskProcessor creates a new replication task processor.