replication

package
v1.21.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 56 Imported by: 0

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.

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

Constants

This section is empty.

Variables

View Source
var (
	// ErrClosed indicates stream closed before a read/write operation
	ErrClosed = serviceerror.NewUnavailable("stream closed")
)
View Source
var (
	// ErrUnknownReplicationTask is the error to indicate unknown replication task type
	ErrUnknownReplicationTask = serviceerror.NewInvalidArgument("unknown replication task")
)
View Source
var (
	TaskRetryPolicy = backoff.NewExponentialRetryPolicy(1 * time.Second).
		WithBackoffCoefficient(1.2).
		WithMaximumInterval(5 * time.Second).
		WithMaximumAttempts(80).
		WithExpirationInterval(5 * time.Minute)
)

Functions

func ClusterIDToClusterNameShardCount added in v1.21.0

func ClusterIDToClusterNameShardCount(
	allClusterInfo map[string]cluster.ClusterInformation,
	clusterID int32,
) (string, int32, error)

func NDCHistoryResenderProvider added in v1.21.0

func NDCHistoryResenderProvider(
	config *configs.Config,
	namespaceRegistry namespace.Registry,
	clientBean client.Bean,
	serializer serialization.Serializer,
	logger log.Logger,
) xdc.NDCHistoryResender

func NewSequentialTaskQueue added in v1.21.0

func NewTaskProcessorManager

func NewTaskProcessorManager(
	config *configs.Config,
	shard shard.Context,
	engine shard.Engine,
	workflowCache wcache.Cache,
	workflowDeleteManager deletemanager.DeleteManager,
	clientBean client.Bean,
	eventSerializer serialization.Serializer,
	replicationTaskFetcherFactory TaskFetcherFactory,
	taskExecutorProvider TaskExecutorProvider,
) *taskProcessorManagerImpl

func ReplicationStreamSchedulerLifetimeHooks added in v1.21.0

func ReplicationStreamSchedulerLifetimeHooks(
	lc fx.Lifecycle,
	scheduler ctasks.Scheduler[TrackableExecutableTask],
)

func ReplicationStreamSchedulerProvider added in v1.21.0

func ReplicationStreamSchedulerProvider(
	config *configs.Config,
	logger log.Logger,
) ctasks.Scheduler[TrackableExecutableTask]

func SequentialTaskQueueCompareLess added in v1.21.0

func SequentialTaskQueueCompareLess(this TrackableExecutableTask, that TrackableExecutableTask) bool

func TaskHashFn added in v1.21.0

func TaskHashFn(
	task interface{},
) uint32

func TaskOperationTag added in v1.21.0

func TaskOperationTag(
	replicationTask *replicationspb.ReplicationTask,
) string

func TaskWorkflowKey added in v1.21.0

func TaskWorkflowKey(
	item interface{},
) *definition.WorkflowKey

Types

type AckManager

type AckManager interface {
	NotifyNewTasks(tasks []tasks.Task)
	GetMaxTaskInfo() (int64, time.Time)
	GetTasks(ctx context.Context, pollingCluster string, queryMessageID int64) (*replicationspb.ReplicationMessages, error)
	GetTask(ctx context.Context, taskInfo *replicationspb.ReplicationTaskInfo) (*replicationspb.ReplicationTask, error)
	Close()

	SubscribeNotification() (<-chan struct{}, string)
	UnsubscribeNotification(string)
	ConvertTask(
		ctx context.Context,
		task tasks.Task,
	) (*replicationspb.ReplicationTask, error)
	GetReplicationTasksIter(
		ctx context.Context,
		pollingCluster string,
		minInclusiveTaskID int64,
		maxExclusiveTaskID int64,
	) (collection.Iterator[tasks.Task], error)
}

func NewAckManager

func NewAckManager(
	shard shard.Context,
	workflowCache wcache.Cache,
	executionMgr persistence.ExecutionManager,
	logger log.Logger,
) AckManager

type BiDirectionStream added in v1.21.0

type BiDirectionStream[Req any, Resp any] interface {
	Send(Req) error
	Recv() (<-chan StreamResp[Resp], error)
	Close()
	IsValid() bool
}

type BiDirectionStreamClient added in v1.21.0

type BiDirectionStreamClient[Req any, Resp any] interface {
	Send(Req) error
	Recv() (Resp, error)
}

type BiDirectionStreamClientProvider added in v1.21.0

type BiDirectionStreamClientProvider[Req any, Resp any] interface {
	Get(ctx context.Context) (BiDirectionStreamClient[Req, Resp], error)
}

type BiDirectionStreamImpl added in v1.21.0

type BiDirectionStreamImpl[Req any, Resp any] struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewBiDirectionStream added in v1.21.0

func NewBiDirectionStream[Req any, Resp any](
	clientProvider BiDirectionStreamClientProvider[Req, Resp],
	metricsHandler metrics.Handler,
	logger log.Logger,
) *BiDirectionStreamImpl[Req, Resp]

func (*BiDirectionStreamImpl[Req, Resp]) Close added in v1.21.0

func (s *BiDirectionStreamImpl[Req, Resp]) Close()

func (*BiDirectionStreamImpl[Req, Resp]) IsValid added in v1.21.0

func (s *BiDirectionStreamImpl[Req, Resp]) IsValid() bool

func (*BiDirectionStreamImpl[Req, Resp]) Recv added in v1.21.0

func (s *BiDirectionStreamImpl[Req, Resp]) Recv() (<-chan StreamResp[Resp], error)

func (*BiDirectionStreamImpl[Req, Resp]) Send added in v1.21.0

func (s *BiDirectionStreamImpl[Req, Resp]) Send(
	request Req,
) error

type ClusterShardKey added in v1.21.0

type ClusterShardKey struct {
	ClusterID int32
	ShardID   int32
}

func NewClusterShardKey added in v1.21.0

func NewClusterShardKey(
	ClusterID int32,
	ClusterShardID int32,
) ClusterShardKey

type ClusterShardKeyPair added in v1.21.0

type ClusterShardKeyPair struct {
	Client ClusterShardKey
	Server ClusterShardKey
}

type DLQHandler

type DLQHandler interface {
	GetMessages(
		ctx context.Context,
		sourceCluster string,
		lastMessageID int64,
		pageSize int,
		pageToken []byte,
	) ([]*replicationspb.ReplicationTask, []*replicationspb.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 NewLazyDLQHandler

func NewLazyDLQHandler(
	shard shard.Context,
	deleteManager deletemanager.DeleteManager,
	workflowCache wcache.Cache,
	clientBean client.Bean,
	taskExecutorProvider TaskExecutorProvider,
) DLQHandler

type ExecutableActivityStateTask added in v1.21.0

type ExecutableActivityStateTask struct {
	ProcessToolBox

	definition.WorkflowKey
	ExecutableTask
	// contains filtered or unexported fields
}

func NewExecutableActivityStateTask added in v1.21.0

func NewExecutableActivityStateTask(
	processToolBox ProcessToolBox,
	taskID int64,
	taskCreationTime time.Time,
	task *replicationspb.SyncActivityTaskAttributes,
	sourceClusterName string,
) *ExecutableActivityStateTask

func (*ExecutableActivityStateTask) Execute added in v1.21.0

func (e *ExecutableActivityStateTask) Execute() error

func (*ExecutableActivityStateTask) HandleErr added in v1.21.0

func (e *ExecutableActivityStateTask) HandleErr(err error) error

func (*ExecutableActivityStateTask) MarkPoisonPill added in v1.21.0

func (e *ExecutableActivityStateTask) MarkPoisonPill() error

func (*ExecutableActivityStateTask) QueueID added in v1.21.0

func (e *ExecutableActivityStateTask) QueueID() interface{}

type ExecutableHistoryTask added in v1.21.0

type ExecutableHistoryTask struct {
	ProcessToolBox

	definition.WorkflowKey
	ExecutableTask
	// contains filtered or unexported fields
}

func NewExecutableHistoryTask added in v1.21.0

func NewExecutableHistoryTask(
	processToolBox ProcessToolBox,
	taskID int64,
	taskCreationTime time.Time,
	task *replicationspb.HistoryTaskAttributes,
	sourceClusterName string,
) *ExecutableHistoryTask

func (*ExecutableHistoryTask) Execute added in v1.21.0

func (e *ExecutableHistoryTask) Execute() error

func (*ExecutableHistoryTask) HandleErr added in v1.21.0

func (e *ExecutableHistoryTask) HandleErr(err error) error

func (*ExecutableHistoryTask) MarkPoisonPill added in v1.21.0

func (e *ExecutableHistoryTask) MarkPoisonPill() error

func (*ExecutableHistoryTask) QueueID added in v1.21.0

func (e *ExecutableHistoryTask) QueueID() interface{}

type ExecutableNoopTask added in v1.21.0

type ExecutableNoopTask struct {
	ExecutableTask
}

func NewExecutableNoopTask added in v1.21.0

func NewExecutableNoopTask(
	processToolBox ProcessToolBox,
	taskID int64,
	taskCreationTime time.Time,
) *ExecutableNoopTask

func (*ExecutableNoopTask) Execute added in v1.21.0

func (e *ExecutableNoopTask) Execute() error

func (*ExecutableNoopTask) HandleErr added in v1.21.0

func (e *ExecutableNoopTask) HandleErr(err error) error

func (*ExecutableNoopTask) MarkPoisonPill added in v1.21.0

func (e *ExecutableNoopTask) MarkPoisonPill() error

func (*ExecutableNoopTask) QueueID added in v1.21.0

func (e *ExecutableNoopTask) QueueID() interface{}

type ExecutableTask added in v1.21.0

type ExecutableTask interface {
	TaskID() int64
	TaskCreationTime() time.Time
	Ack()
	Nack(err error)
	Abort()
	Cancel()
	Reschedule()
	IsRetryableError(err error) bool
	RetryPolicy() backoff.RetryPolicy
	State() ctasks.State
	TerminalState() bool
	Attempt() int
	Resend(
		ctx context.Context,
		remoteCluster string,
		retryErr *serviceerrors.RetryReplication,
	) error
	DeleteWorkflow(
		ctx context.Context,
		workflowKey definition.WorkflowKey,
	) (retError error)
	GetNamespaceInfo(
		namespaceID string,
	) (string, bool, error)
}

type ExecutableTaskImpl added in v1.21.0

type ExecutableTaskImpl struct {
	ProcessToolBox
	// contains filtered or unexported fields
}

func NewExecutableTask added in v1.21.0

func NewExecutableTask(
	processToolBox ProcessToolBox,
	taskID int64,
	metricsTag string,
	taskCreationTime time.Time,
	taskReceivedTime time.Time,
) *ExecutableTaskImpl

func (*ExecutableTaskImpl) Abort added in v1.21.0

func (e *ExecutableTaskImpl) Abort()

func (*ExecutableTaskImpl) Ack added in v1.21.0

func (e *ExecutableTaskImpl) Ack()

func (*ExecutableTaskImpl) Attempt added in v1.21.0

func (e *ExecutableTaskImpl) Attempt() int

func (*ExecutableTaskImpl) Cancel added in v1.21.0

func (e *ExecutableTaskImpl) Cancel()

func (*ExecutableTaskImpl) DeleteWorkflow added in v1.21.0

func (e *ExecutableTaskImpl) DeleteWorkflow(
	ctx context.Context,
	workflowKey definition.WorkflowKey,
) (retError error)

func (*ExecutableTaskImpl) GetNamespaceInfo added in v1.21.0

func (e *ExecutableTaskImpl) GetNamespaceInfo(
	namespaceID string,
) (string, bool, error)

func (*ExecutableTaskImpl) IsRetryableError added in v1.21.0

func (e *ExecutableTaskImpl) IsRetryableError(err error) bool

func (*ExecutableTaskImpl) Nack added in v1.21.0

func (e *ExecutableTaskImpl) Nack(err error)

func (*ExecutableTaskImpl) Reschedule added in v1.21.0

func (e *ExecutableTaskImpl) Reschedule()

func (*ExecutableTaskImpl) Resend added in v1.21.0

func (e *ExecutableTaskImpl) Resend(
	ctx context.Context,
	remoteCluster string,
	retryErr *serviceerrors.RetryReplication,
) error

func (*ExecutableTaskImpl) RetryPolicy added in v1.21.0

func (e *ExecutableTaskImpl) RetryPolicy() backoff.RetryPolicy

func (*ExecutableTaskImpl) State added in v1.21.0

func (e *ExecutableTaskImpl) State() ctasks.State

func (*ExecutableTaskImpl) TaskCreationTime added in v1.21.0

func (e *ExecutableTaskImpl) TaskCreationTime() time.Time

func (*ExecutableTaskImpl) TaskID added in v1.21.0

func (e *ExecutableTaskImpl) TaskID() int64

func (*ExecutableTaskImpl) TerminalState added in v1.21.0

func (e *ExecutableTaskImpl) TerminalState() bool

type ExecutableTaskTracker added in v1.21.0

type ExecutableTaskTracker interface {
	TrackTasks(exclusiveHighWatermarkInfo WatermarkInfo, tasks ...TrackableExecutableTask) []TrackableExecutableTask
	LowWatermark() *WatermarkInfo
	Size() int
	Cancel()
}

type ExecutableTaskTrackerImpl added in v1.21.0

type ExecutableTaskTrackerImpl struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewExecutableTaskTracker added in v1.21.0

func NewExecutableTaskTracker(
	logger log.Logger,
) *ExecutableTaskTrackerImpl

func (*ExecutableTaskTrackerImpl) Cancel added in v1.21.0

func (t *ExecutableTaskTrackerImpl) Cancel()

func (*ExecutableTaskTrackerImpl) LowWatermark added in v1.21.0

func (t *ExecutableTaskTrackerImpl) LowWatermark() *WatermarkInfo

func (*ExecutableTaskTrackerImpl) Size added in v1.21.0

func (t *ExecutableTaskTrackerImpl) Size() int

func (*ExecutableTaskTrackerImpl) TrackTasks added in v1.21.0

func (t *ExecutableTaskTrackerImpl) TrackTasks(
	exclusiveHighWatermarkInfo WatermarkInfo,
	tasks ...TrackableExecutableTask,
) []TrackableExecutableTask

TrackTasks add tasks for tracking, return valid tasks (dedup) if task tracker is cancelled, then newly added tasks will also be cancelled tasks should be sorted by task ID, all task IDs < exclusiveHighWatermarkInfo

type ExecutableUnknownTask added in v1.21.0

type ExecutableUnknownTask struct {
	ProcessToolBox

	ExecutableTask
	// contains filtered or unexported fields
}

func NewExecutableUnknownTask added in v1.21.0

func NewExecutableUnknownTask(
	processToolBox ProcessToolBox,
	taskID int64,
	taskCreationTime time.Time,
	task any,
) *ExecutableUnknownTask

func (*ExecutableUnknownTask) Execute added in v1.21.0

func (e *ExecutableUnknownTask) Execute() error

func (*ExecutableUnknownTask) HandleErr added in v1.21.0

func (e *ExecutableUnknownTask) HandleErr(err error) error

func (*ExecutableUnknownTask) IsRetryableError added in v1.21.0

func (e *ExecutableUnknownTask) IsRetryableError(err error) bool

func (*ExecutableUnknownTask) MarkPoisonPill added in v1.21.0

func (e *ExecutableUnknownTask) MarkPoisonPill() error

func (*ExecutableUnknownTask) QueueID added in v1.21.0

func (e *ExecutableUnknownTask) QueueID() interface{}

type ExecutableWorkflowStateTask added in v1.21.0

type ExecutableWorkflowStateTask struct {
	ProcessToolBox

	definition.WorkflowKey
	ExecutableTask
	// contains filtered or unexported fields
}

func NewExecutableWorkflowStateTask added in v1.21.0

func NewExecutableWorkflowStateTask(
	processToolBox ProcessToolBox,
	taskID int64,
	taskCreationTime time.Time,
	task *replicationspb.SyncWorkflowStateTaskAttributes,
	sourceClusterName string,
) *ExecutableWorkflowStateTask

func (*ExecutableWorkflowStateTask) Execute added in v1.21.0

func (e *ExecutableWorkflowStateTask) Execute() error

func (*ExecutableWorkflowStateTask) HandleErr added in v1.21.0

func (e *ExecutableWorkflowStateTask) HandleErr(err error) error

func (*ExecutableWorkflowStateTask) MarkPoisonPill added in v1.21.0

func (e *ExecutableWorkflowStateTask) MarkPoisonPill() error

func (*ExecutableWorkflowStateTask) QueueID added in v1.21.0

func (e *ExecutableWorkflowStateTask) QueueID() interface{}

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) Close added in v1.21.0

func (m *MockAckManager) Close()

Close mocks base method.

func (*MockAckManager) ConvertTask added in v1.21.0

func (m *MockAckManager) ConvertTask(ctx context.Context, task tasks.Task) (*repication.ReplicationTask, error)

ConvertTask mocks base method.

func (*MockAckManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAckManager) GetMaxTaskInfo added in v1.17.2

func (m *MockAckManager) GetMaxTaskInfo() (int64, time.Time)

GetMaxTaskInfo mocks base method.

func (*MockAckManager) GetReplicationTasksIter added in v1.21.0

func (m *MockAckManager) GetReplicationTasksIter(ctx context.Context, pollingCluster string, minInclusiveTaskID, maxExclusiveTaskID int64) (collection.Iterator[tasks.Task], error)

GetReplicationTasksIter mocks base method.

func (*MockAckManager) GetTask

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.

func (*MockAckManager) SubscribeNotification added in v1.21.0

func (m *MockAckManager) SubscribeNotification() (<-chan struct{}, string)

SubscribeNotification mocks base method.

func (*MockAckManager) UnsubscribeNotification added in v1.21.0

func (m *MockAckManager) UnsubscribeNotification(arg0 string)

UnsubscribeNotification mocks base method.

type MockAckManagerMockRecorder

type MockAckManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MockAckManagerMockRecorder is the mock recorder for MockAckManager.

func (*MockAckManagerMockRecorder) Close added in v1.21.0

func (mr *MockAckManagerMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockAckManagerMockRecorder) ConvertTask added in v1.21.0

func (mr *MockAckManagerMockRecorder) ConvertTask(ctx, task interface{}) *gomock.Call

ConvertTask indicates an expected call of ConvertTask.

func (*MockAckManagerMockRecorder) GetMaxTaskInfo added in v1.17.2

func (mr *MockAckManagerMockRecorder) GetMaxTaskInfo() *gomock.Call

GetMaxTaskInfo indicates an expected call of GetMaxTaskInfo.

func (*MockAckManagerMockRecorder) GetReplicationTasksIter added in v1.21.0

func (mr *MockAckManagerMockRecorder) GetReplicationTasksIter(ctx, pollingCluster, minInclusiveTaskID, maxExclusiveTaskID interface{}) *gomock.Call

GetReplicationTasksIter indicates an expected call of GetReplicationTasksIter.

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.

func (*MockAckManagerMockRecorder) SubscribeNotification added in v1.21.0

func (mr *MockAckManagerMockRecorder) SubscribeNotification() *gomock.Call

SubscribeNotification indicates an expected call of SubscribeNotification.

func (*MockAckManagerMockRecorder) UnsubscribeNotification added in v1.21.0

func (mr *MockAckManagerMockRecorder) UnsubscribeNotification(arg0 interface{}) *gomock.Call

UnsubscribeNotification indicates an expected call of UnsubscribeNotification.

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

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, []*repication.ReplicationTaskInfo, []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 MockExecutableTask added in v1.21.0

type MockExecutableTask struct {
	// contains filtered or unexported fields
}

MockExecutableTask is a mock of ExecutableTask interface.

func NewMockExecutableTask added in v1.21.0

func NewMockExecutableTask(ctrl *gomock.Controller) *MockExecutableTask

NewMockExecutableTask creates a new mock instance.

func (*MockExecutableTask) Abort added in v1.21.0

func (m *MockExecutableTask) Abort()

Abort mocks base method.

func (*MockExecutableTask) Ack added in v1.21.0

func (m *MockExecutableTask) Ack()

Ack mocks base method.

func (*MockExecutableTask) Attempt added in v1.21.0

func (m *MockExecutableTask) Attempt() int

Attempt mocks base method.

func (*MockExecutableTask) Cancel added in v1.21.0

func (m *MockExecutableTask) Cancel()

Cancel mocks base method.

func (*MockExecutableTask) DeleteWorkflow added in v1.21.0

func (m *MockExecutableTask) DeleteWorkflow(ctx context.Context, workflowKey definition.WorkflowKey) error

DeleteWorkflow mocks base method.

func (*MockExecutableTask) EXPECT added in v1.21.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockExecutableTask) GetNamespaceInfo added in v1.21.0

func (m *MockExecutableTask) GetNamespaceInfo(namespaceID string) (string, bool, error)

GetNamespaceInfo mocks base method.

func (*MockExecutableTask) IsRetryableError added in v1.21.0

func (m *MockExecutableTask) IsRetryableError(err error) bool

IsRetryableError mocks base method.

func (*MockExecutableTask) Nack added in v1.21.0

func (m *MockExecutableTask) Nack(err error)

Nack mocks base method.

func (*MockExecutableTask) Reschedule added in v1.21.0

func (m *MockExecutableTask) Reschedule()

Reschedule mocks base method.

func (*MockExecutableTask) Resend added in v1.21.0

func (m *MockExecutableTask) Resend(ctx context.Context, remoteCluster string, retryErr *serviceerror.RetryReplication) error

Resend mocks base method.

func (*MockExecutableTask) RetryPolicy added in v1.21.0

func (m *MockExecutableTask) RetryPolicy() backoff.RetryPolicy

RetryPolicy mocks base method.

func (*MockExecutableTask) State added in v1.21.0

func (m *MockExecutableTask) State() tasks.State

State mocks base method.

func (*MockExecutableTask) TaskCreationTime added in v1.21.0

func (m *MockExecutableTask) TaskCreationTime() time.Time

TaskCreationTime mocks base method.

func (*MockExecutableTask) TaskID added in v1.21.0

func (m *MockExecutableTask) TaskID() int64

TaskID mocks base method.

func (*MockExecutableTask) TerminalState added in v1.21.0

func (m *MockExecutableTask) TerminalState() bool

TerminalState mocks base method.

type MockExecutableTaskMockRecorder added in v1.21.0

type MockExecutableTaskMockRecorder struct {
	// contains filtered or unexported fields
}

MockExecutableTaskMockRecorder is the mock recorder for MockExecutableTask.

func (*MockExecutableTaskMockRecorder) Abort added in v1.21.0

Abort indicates an expected call of Abort.

func (*MockExecutableTaskMockRecorder) Ack added in v1.21.0

Ack indicates an expected call of Ack.

func (*MockExecutableTaskMockRecorder) Attempt added in v1.21.0

Attempt indicates an expected call of Attempt.

func (*MockExecutableTaskMockRecorder) Cancel added in v1.21.0

Cancel indicates an expected call of Cancel.

func (*MockExecutableTaskMockRecorder) DeleteWorkflow added in v1.21.0

func (mr *MockExecutableTaskMockRecorder) DeleteWorkflow(ctx, workflowKey interface{}) *gomock.Call

DeleteWorkflow indicates an expected call of DeleteWorkflow.

func (*MockExecutableTaskMockRecorder) GetNamespaceInfo added in v1.21.0

func (mr *MockExecutableTaskMockRecorder) GetNamespaceInfo(namespaceID interface{}) *gomock.Call

GetNamespaceInfo indicates an expected call of GetNamespaceInfo.

func (*MockExecutableTaskMockRecorder) IsRetryableError added in v1.21.0

func (mr *MockExecutableTaskMockRecorder) IsRetryableError(err interface{}) *gomock.Call

IsRetryableError indicates an expected call of IsRetryableError.

func (*MockExecutableTaskMockRecorder) Nack added in v1.21.0

func (mr *MockExecutableTaskMockRecorder) Nack(err interface{}) *gomock.Call

Nack indicates an expected call of Nack.

func (*MockExecutableTaskMockRecorder) Reschedule added in v1.21.0

func (mr *MockExecutableTaskMockRecorder) Reschedule() *gomock.Call

Reschedule indicates an expected call of Reschedule.

func (*MockExecutableTaskMockRecorder) Resend added in v1.21.0

func (mr *MockExecutableTaskMockRecorder) Resend(ctx, remoteCluster, retryErr interface{}) *gomock.Call

Resend indicates an expected call of Resend.

func (*MockExecutableTaskMockRecorder) RetryPolicy added in v1.21.0

func (mr *MockExecutableTaskMockRecorder) RetryPolicy() *gomock.Call

RetryPolicy indicates an expected call of RetryPolicy.

func (*MockExecutableTaskMockRecorder) State added in v1.21.0

State indicates an expected call of State.

func (*MockExecutableTaskMockRecorder) TaskCreationTime added in v1.21.0

func (mr *MockExecutableTaskMockRecorder) TaskCreationTime() *gomock.Call

TaskCreationTime indicates an expected call of TaskCreationTime.

func (*MockExecutableTaskMockRecorder) TaskID added in v1.21.0

TaskID indicates an expected call of TaskID.

func (*MockExecutableTaskMockRecorder) TerminalState added in v1.21.0

func (mr *MockExecutableTaskMockRecorder) TerminalState() *gomock.Call

TerminalState indicates an expected call of TerminalState.

type MockExecutableTaskTracker added in v1.21.0

type MockExecutableTaskTracker struct {
	// contains filtered or unexported fields
}

MockExecutableTaskTracker is a mock of ExecutableTaskTracker interface.

func NewMockExecutableTaskTracker added in v1.21.0

func NewMockExecutableTaskTracker(ctrl *gomock.Controller) *MockExecutableTaskTracker

NewMockExecutableTaskTracker creates a new mock instance.

func (*MockExecutableTaskTracker) Cancel added in v1.21.0

func (m *MockExecutableTaskTracker) Cancel()

Cancel mocks base method.

func (*MockExecutableTaskTracker) EXPECT added in v1.21.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockExecutableTaskTracker) LowWatermark added in v1.21.0

func (m *MockExecutableTaskTracker) LowWatermark() *WatermarkInfo

LowWatermark mocks base method.

func (*MockExecutableTaskTracker) Size added in v1.21.0

func (m *MockExecutableTaskTracker) Size() int

Size mocks base method.

func (*MockExecutableTaskTracker) TrackTasks added in v1.21.0

func (m *MockExecutableTaskTracker) TrackTasks(exclusiveHighWatermarkInfo WatermarkInfo, tasks ...TrackableExecutableTask) []TrackableExecutableTask

TrackTasks mocks base method.

type MockExecutableTaskTrackerMockRecorder added in v1.21.0

type MockExecutableTaskTrackerMockRecorder struct {
	// contains filtered or unexported fields
}

MockExecutableTaskTrackerMockRecorder is the mock recorder for MockExecutableTaskTracker.

func (*MockExecutableTaskTrackerMockRecorder) Cancel added in v1.21.0

Cancel indicates an expected call of Cancel.

func (*MockExecutableTaskTrackerMockRecorder) LowWatermark added in v1.21.0

LowWatermark indicates an expected call of LowWatermark.

func (*MockExecutableTaskTrackerMockRecorder) Size added in v1.21.0

Size indicates an expected call of Size.

func (*MockExecutableTaskTrackerMockRecorder) TrackTasks added in v1.21.0

func (mr *MockExecutableTaskTrackerMockRecorder) TrackTasks(exclusiveHighWatermarkInfo interface{}, tasks ...interface{}) *gomock.Call

TrackTasks indicates an expected call of TrackTasks.

type MockSourceTaskConvertor added in v1.21.0

type MockSourceTaskConvertor struct {
	// contains filtered or unexported fields
}

MockSourceTaskConvertor is a mock of SourceTaskConvertor interface.

func NewMockSourceTaskConvertor added in v1.21.0

func NewMockSourceTaskConvertor(ctrl *gomock.Controller) *MockSourceTaskConvertor

NewMockSourceTaskConvertor creates a new mock instance.

func (*MockSourceTaskConvertor) Convert added in v1.21.0

Convert mocks base method.

func (*MockSourceTaskConvertor) EXPECT added in v1.21.0

EXPECT returns an object that allows the caller to indicate expected use.

type MockSourceTaskConvertorMockRecorder added in v1.21.0

type MockSourceTaskConvertorMockRecorder struct {
	// contains filtered or unexported fields
}

MockSourceTaskConvertorMockRecorder is the mock recorder for MockSourceTaskConvertor.

func (*MockSourceTaskConvertorMockRecorder) Convert added in v1.21.0

func (mr *MockSourceTaskConvertorMockRecorder) Convert(task interface{}) *gomock.Call

Convert indicates an expected call of Convert.

type MockStreamReceiver added in v1.21.0

type MockStreamReceiver struct {
	// contains filtered or unexported fields
}

MockStreamReceiver is a mock of StreamReceiver interface.

func NewMockStreamReceiver added in v1.21.0

func NewMockStreamReceiver(ctrl *gomock.Controller) *MockStreamReceiver

NewMockStreamReceiver creates a new mock instance.

func (*MockStreamReceiver) EXPECT added in v1.21.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStreamReceiver) IsValid added in v1.21.0

func (m *MockStreamReceiver) IsValid() bool

IsValid mocks base method.

func (*MockStreamReceiver) Key added in v1.21.0

Key mocks base method.

func (*MockStreamReceiver) Start added in v1.21.0

func (m *MockStreamReceiver) Start()

Start mocks base method.

func (*MockStreamReceiver) Stop added in v1.21.0

func (m *MockStreamReceiver) Stop()

Stop mocks base method.

type MockStreamReceiverMockRecorder added in v1.21.0

type MockStreamReceiverMockRecorder struct {
	// contains filtered or unexported fields
}

MockStreamReceiverMockRecorder is the mock recorder for MockStreamReceiver.

func (*MockStreamReceiverMockRecorder) IsValid added in v1.21.0

IsValid indicates an expected call of IsValid.

func (*MockStreamReceiverMockRecorder) Key added in v1.21.0

Key indicates an expected call of Key.

func (*MockStreamReceiverMockRecorder) Start added in v1.21.0

Start indicates an expected call of Start.

func (*MockStreamReceiverMockRecorder) Stop added in v1.21.0

Stop indicates an expected call of Stop.

type MockStreamSender added in v1.21.0

type MockStreamSender struct {
	// contains filtered or unexported fields
}

MockStreamSender is a mock of StreamSender interface.

func NewMockStreamSender added in v1.21.0

func NewMockStreamSender(ctrl *gomock.Controller) *MockStreamSender

NewMockStreamSender creates a new mock instance.

func (*MockStreamSender) EXPECT added in v1.21.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStreamSender) IsValid added in v1.21.0

func (m *MockStreamSender) IsValid() bool

IsValid mocks base method.

func (*MockStreamSender) Key added in v1.21.0

Key mocks base method.

func (*MockStreamSender) Start added in v1.21.0

func (m *MockStreamSender) Start()

Start mocks base method.

func (*MockStreamSender) Stop added in v1.21.0

func (m *MockStreamSender) Stop()

Stop mocks base method.

type MockStreamSenderMockRecorder added in v1.21.0

type MockStreamSenderMockRecorder struct {
	// contains filtered or unexported fields
}

MockStreamSenderMockRecorder is the mock recorder for MockStreamSender.

func (*MockStreamSenderMockRecorder) IsValid added in v1.21.0

func (mr *MockStreamSenderMockRecorder) IsValid() *gomock.Call

IsValid indicates an expected call of IsValid.

func (*MockStreamSenderMockRecorder) Key added in v1.21.0

Key indicates an expected call of Key.

func (*MockStreamSenderMockRecorder) Start added in v1.21.0

Start indicates an expected call of Start.

func (*MockStreamSenderMockRecorder) Stop added in v1.21.0

Stop indicates an expected call of Stop.

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

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTaskExecutor) Execute

func (m *MockTaskExecutor) Execute(ctx context.Context, replicationTask *repication.ReplicationTask, forceApply bool) 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(ctx, 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

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

Start indicates an expected call of Start.

func (*MockTaskFetcherFactoryMockRecorder) Stop

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

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTaskProcessor) Start

func (m *MockTaskProcessor) Start()

Start mocks base method.

func (*MockTaskProcessor) Stop

func (m *MockTaskProcessor) Stop()

Stop mocks base method.

type MockTaskProcessorMockRecorder

type MockTaskProcessorMockRecorder struct {
	// contains filtered or unexported fields
}

MockTaskProcessorMockRecorder is the mock recorder for MockTaskProcessor.

func (*MockTaskProcessorMockRecorder) Start

Start indicates an expected call of Start.

func (*MockTaskProcessorMockRecorder) Stop

Stop indicates an expected call of Stop.

type MockTrackableExecutableTask added in v1.21.0

type MockTrackableExecutableTask struct {
	// contains filtered or unexported fields
}

MockTrackableExecutableTask is a mock of TrackableExecutableTask interface.

func NewMockTrackableExecutableTask added in v1.21.0

func NewMockTrackableExecutableTask(ctrl *gomock.Controller) *MockTrackableExecutableTask

NewMockTrackableExecutableTask creates a new mock instance.

func (*MockTrackableExecutableTask) Abort added in v1.21.0

func (m *MockTrackableExecutableTask) Abort()

Abort mocks base method.

func (*MockTrackableExecutableTask) Ack added in v1.21.0

func (m *MockTrackableExecutableTask) Ack()

Ack mocks base method.

func (*MockTrackableExecutableTask) Cancel added in v1.21.0

func (m *MockTrackableExecutableTask) Cancel()

Cancel mocks base method.

func (*MockTrackableExecutableTask) EXPECT added in v1.21.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTrackableExecutableTask) Execute added in v1.21.0

func (m *MockTrackableExecutableTask) Execute() error

Execute mocks base method.

func (*MockTrackableExecutableTask) HandleErr added in v1.21.0

func (m *MockTrackableExecutableTask) HandleErr(err error) error

HandleErr mocks base method.

func (*MockTrackableExecutableTask) IsRetryableError added in v1.21.0

func (m *MockTrackableExecutableTask) IsRetryableError(err error) bool

IsRetryableError mocks base method.

func (*MockTrackableExecutableTask) MarkPoisonPill added in v1.21.0

func (m *MockTrackableExecutableTask) MarkPoisonPill() error

MarkPoisonPill mocks base method.

func (*MockTrackableExecutableTask) Nack added in v1.21.0

func (m *MockTrackableExecutableTask) Nack(err error)

Nack mocks base method.

func (*MockTrackableExecutableTask) QueueID added in v1.21.0

func (m *MockTrackableExecutableTask) QueueID() interface{}

QueueID mocks base method.

func (*MockTrackableExecutableTask) Reschedule added in v1.21.0

func (m *MockTrackableExecutableTask) Reschedule()

Reschedule mocks base method.

func (*MockTrackableExecutableTask) RetryPolicy added in v1.21.0

RetryPolicy mocks base method.

func (*MockTrackableExecutableTask) State added in v1.21.0

State mocks base method.

func (*MockTrackableExecutableTask) TaskCreationTime added in v1.21.0

func (m *MockTrackableExecutableTask) TaskCreationTime() time.Time

TaskCreationTime mocks base method.

func (*MockTrackableExecutableTask) TaskID added in v1.21.0

func (m *MockTrackableExecutableTask) TaskID() int64

TaskID mocks base method.

type MockTrackableExecutableTaskMockRecorder added in v1.21.0

type MockTrackableExecutableTaskMockRecorder struct {
	// contains filtered or unexported fields
}

MockTrackableExecutableTaskMockRecorder is the mock recorder for MockTrackableExecutableTask.

func (*MockTrackableExecutableTaskMockRecorder) Abort added in v1.21.0

Abort indicates an expected call of Abort.

func (*MockTrackableExecutableTaskMockRecorder) Ack added in v1.21.0

Ack indicates an expected call of Ack.

func (*MockTrackableExecutableTaskMockRecorder) Cancel added in v1.21.0

Cancel indicates an expected call of Cancel.

func (*MockTrackableExecutableTaskMockRecorder) Execute added in v1.21.0

Execute indicates an expected call of Execute.

func (*MockTrackableExecutableTaskMockRecorder) HandleErr added in v1.21.0

func (mr *MockTrackableExecutableTaskMockRecorder) HandleErr(err interface{}) *gomock.Call

HandleErr indicates an expected call of HandleErr.

func (*MockTrackableExecutableTaskMockRecorder) IsRetryableError added in v1.21.0

func (mr *MockTrackableExecutableTaskMockRecorder) IsRetryableError(err interface{}) *gomock.Call

IsRetryableError indicates an expected call of IsRetryableError.

func (*MockTrackableExecutableTaskMockRecorder) MarkPoisonPill added in v1.21.0

func (mr *MockTrackableExecutableTaskMockRecorder) MarkPoisonPill() *gomock.Call

MarkPoisonPill indicates an expected call of MarkPoisonPill.

func (*MockTrackableExecutableTaskMockRecorder) Nack added in v1.21.0

func (mr *MockTrackableExecutableTaskMockRecorder) Nack(err interface{}) *gomock.Call

Nack indicates an expected call of Nack.

func (*MockTrackableExecutableTaskMockRecorder) QueueID added in v1.21.0

QueueID indicates an expected call of QueueID.

func (*MockTrackableExecutableTaskMockRecorder) Reschedule added in v1.21.0

Reschedule indicates an expected call of Reschedule.

func (*MockTrackableExecutableTaskMockRecorder) RetryPolicy added in v1.21.0

RetryPolicy indicates an expected call of RetryPolicy.

func (*MockTrackableExecutableTaskMockRecorder) State added in v1.21.0

State indicates an expected call of State.

func (*MockTrackableExecutableTaskMockRecorder) TaskCreationTime added in v1.21.0

func (mr *MockTrackableExecutableTaskMockRecorder) TaskCreationTime() *gomock.Call

TaskCreationTime indicates an expected call of TaskCreationTime.

func (*MockTrackableExecutableTaskMockRecorder) TaskID added in v1.21.0

TaskID indicates an expected call of TaskID.

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

EXPECT returns an object that allows the caller to indicate expected use.

func (*MocktaskFetcher) Start

func (m *MocktaskFetcher) Start()

Start mocks base method.

func (*MocktaskFetcher) Stop

func (m *MocktaskFetcher) Stop()

Stop mocks base method.

type MocktaskFetcherMockRecorder

type MocktaskFetcherMockRecorder struct {
	// contains filtered or unexported fields
}

MocktaskFetcherMockRecorder is the mock recorder for MocktaskFetcher.

func (*MocktaskFetcherMockRecorder) Start

Start indicates an expected call of Start.

func (*MocktaskFetcherMockRecorder) Stop

Stop indicates an expected call of Stop.

type ProcessToolBox added in v1.21.0

type ProcessToolBox struct {
	fx.In

	Config             *configs.Config
	ClusterMetadata    cluster.Metadata
	ClientBean         client.Bean
	ShardController    shard.Controller
	NamespaceCache     namespace.Registry
	NDCHistoryResender xdc.NDCHistoryResender
	TaskScheduler      ctasks.Scheduler[TrackableExecutableTask]
	MetricsHandler     metrics.Handler
	Logger             log.Logger
}

func (*ProcessToolBox) ConvertTasks added in v1.21.0

func (i *ProcessToolBox) ConvertTasks(
	taskClusterName string,
	clientShardKey ClusterShardKey,
	serverShardKey ClusterShardKey,
	replicationTasks ...*replicationspb.ReplicationTask,
) []TrackableExecutableTask

type SequentialTaskQueue added in v1.21.0

type SequentialTaskQueue struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*SequentialTaskQueue) Add added in v1.21.0

func (*SequentialTaskQueue) ID added in v1.21.0

func (q *SequentialTaskQueue) ID() interface{}

func (*SequentialTaskQueue) IsEmpty added in v1.21.0

func (q *SequentialTaskQueue) IsEmpty() bool

func (*SequentialTaskQueue) Len added in v1.21.0

func (q *SequentialTaskQueue) Len() int

func (*SequentialTaskQueue) Peek added in v1.21.0

func (*SequentialTaskQueue) Remove added in v1.21.0

type SourceTaskConvertor added in v1.21.0

type SourceTaskConvertor interface {
	Convert(task tasks.Task) (*replicationspb.ReplicationTask, error)
}

type SourceTaskConvertorImpl added in v1.21.0

type SourceTaskConvertorImpl struct {
	// contains filtered or unexported fields
}

func NewSourceTaskConvertor added in v1.21.0

func NewSourceTaskConvertor(
	historyEngine shard.Engine,
	namespaceCache namespace.Registry,
	clientClusterShardCount int32,
	clientClusterName string,
	clientShardKey ClusterShardKey,
) *SourceTaskConvertorImpl

func (*SourceTaskConvertorImpl) Convert added in v1.21.0

type Stream added in v1.21.0

type Stream BiDirectionStream[*adminservice.StreamWorkflowReplicationMessagesRequest, *adminservice.StreamWorkflowReplicationMessagesResponse]

type StreamBiDirectionStreamClientProvider added in v1.21.0

type StreamBiDirectionStreamClientProvider struct {
	// contains filtered or unexported fields
}

func NewStreamBiDirectionStreamClientProvider added in v1.21.0

func NewStreamBiDirectionStreamClientProvider(
	clusterMetadata cluster.Metadata,
	clientBean client.Bean,
) *StreamBiDirectionStreamClientProvider

func (*StreamBiDirectionStreamClientProvider) Get added in v1.21.0

func (p *StreamBiDirectionStreamClientProvider) Get(
	ctx context.Context,
	clientShardKey ClusterShardKey,
	serverShardKey ClusterShardKey,
) (BiDirectionStreamClient[*adminservice.StreamWorkflowReplicationMessagesRequest, *adminservice.StreamWorkflowReplicationMessagesResponse], error)

type StreamReceiver added in v1.21.0

type StreamReceiver interface {
	common.Daemon
	IsValid() bool
	Key() ClusterShardKeyPair
}

type StreamReceiverImpl added in v1.21.0

type StreamReceiverImpl struct {
	ProcessToolBox
	// contains filtered or unexported fields
}

func NewStreamReceiver added in v1.21.0

func NewStreamReceiver(
	processToolBox ProcessToolBox,
	clientShardKey ClusterShardKey,
	serverShardKey ClusterShardKey,
) *StreamReceiverImpl

func (*StreamReceiverImpl) IsValid added in v1.21.0

func (r *StreamReceiverImpl) IsValid() bool

func (*StreamReceiverImpl) Key added in v1.21.0

func (*StreamReceiverImpl) Start added in v1.21.0

func (r *StreamReceiverImpl) Start()

Start starts the processor

func (*StreamReceiverImpl) Stop added in v1.21.0

func (r *StreamReceiverImpl) Stop()

Stop stops the processor

type StreamReceiverMonitor added in v1.21.0

type StreamReceiverMonitor interface {
	common.Daemon
	RegisterInboundStream(streamSender StreamSender)
}

func StreamReceiverMonitorProvider added in v1.21.0

func StreamReceiverMonitorProvider(
	processToolBox ProcessToolBox,
) StreamReceiverMonitor

type StreamReceiverMonitorImpl added in v1.21.0

type StreamReceiverMonitorImpl struct {
	ProcessToolBox

	sync.Mutex
	// contains filtered or unexported fields
}

func NewStreamReceiverMonitor added in v1.21.0

func NewStreamReceiverMonitor(
	processToolBox ProcessToolBox,
	enableStreaming bool,
) *StreamReceiverMonitorImpl

func (*StreamReceiverMonitorImpl) RegisterInboundStream added in v1.21.0

func (m *StreamReceiverMonitorImpl) RegisterInboundStream(
	streamSender StreamSender,
)

func (*StreamReceiverMonitorImpl) Start added in v1.21.0

func (m *StreamReceiverMonitorImpl) Start()

func (*StreamReceiverMonitorImpl) Stop added in v1.21.0

func (m *StreamReceiverMonitorImpl) Stop()

type StreamResp added in v1.21.0

type StreamResp[Resp any] struct {
	Resp Resp
	Err  error
}

type StreamSender added in v1.21.0

type StreamSender interface {
	common.Daemon
	IsValid() bool
	Key() ClusterShardKeyPair
}

type StreamSenderImpl added in v1.21.0

type StreamSenderImpl struct {
	// contains filtered or unexported fields
}

func NewStreamSender added in v1.21.0

func NewStreamSender(
	server historyservice.HistoryService_StreamWorkflowReplicationMessagesServer,
	shardContext shard.Context,
	historyEngine shard.Engine,
	taskConvertor SourceTaskConvertor,
	clientShardKey ClusterShardKey,
	serverShardKey ClusterShardKey,
) *StreamSenderImpl

func (*StreamSenderImpl) IsValid added in v1.21.0

func (s *StreamSenderImpl) IsValid() bool

func (*StreamSenderImpl) Key added in v1.21.0

func (*StreamSenderImpl) Start added in v1.21.0

func (s *StreamSenderImpl) Start()

func (*StreamSenderImpl) Stop added in v1.21.0

func (s *StreamSenderImpl) Stop()

func (*StreamSenderImpl) Wait added in v1.21.0

func (s *StreamSenderImpl) Wait()

type TaskExecutor

type TaskExecutor interface {
	Execute(ctx context.Context, replicationTask *replicationspb.ReplicationTask, forceApply bool) error
}

func NewTaskExecutor

func NewTaskExecutor(
	remoteCluster string,
	shardContext shard.Context,
	nDCHistoryResender xdc.NDCHistoryResender,
	deleteManager deletemanager.DeleteManager,
	workflowCache wcache.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 TaskExecutorParams struct {
	RemoteCluster   string // TODO: Remove this remote cluster from executor then it can use singleton.
	Shard           shard.Context
	HistoryResender xdc.NDCHistoryResender
	DeleteManager   deletemanager.DeleteManager
	WorkflowCache   wcache.Cache
}

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.

func NewTaskFetcherFactory

func NewTaskFetcherFactory(
	logger log.Logger,
	config *configs.Config,
	clusterMetadata cluster.Metadata,
	clientBean client.Bean,
) TaskFetcherFactory

NewTaskFetcherFactory creates an instance of TaskFetcherFactory with given configs.

func ReplicationTaskFetcherFactoryProvider

func ReplicationTaskFetcherFactoryProvider(
	logger log.Logger,
	config *configs.Config,
	clusterMetadata cluster.Metadata,
	clientBean client.Bean,
) TaskFetcherFactory

type TaskProcessor

type TaskProcessor interface {
	common.Daemon
}

TaskProcessor is the interface for task processor

func NewTaskProcessor

func NewTaskProcessor(
	sourceShardID int32,
	shard shard.Context,
	historyEngine shard.Engine,
	config *configs.Config,
	metricsHandler metrics.Handler,
	replicationTaskFetcher taskFetcher,
	replicationTaskExecutor TaskExecutor,
	eventSerializer serialization.Serializer,
) TaskProcessor

NewTaskProcessor creates a new replication task processor.

type TrackableExecutableTask added in v1.21.0

type TrackableExecutableTask interface {
	ctasks.Task
	QueueID() interface{}
	TaskID() int64
	TaskCreationTime() time.Time
	MarkPoisonPill() error
}

type WatermarkInfo added in v1.21.0

type WatermarkInfo struct {
	Watermark int64
	Timestamp time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL