replicator

package
v0.12.0-reset-patch Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 32 Imported by: 3 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyReplicationTask is the error to indicate empty replication task
	ErrEmptyReplicationTask = &shared.BadRequestError{Message: "empty replication task"}
	// ErrUnknownReplicationTask is the error to indicate unknown replication task type
	ErrUnknownReplicationTask = &shared.BadRequestError{Message: "unknown replication task"}
	// ErrDeserializeReplicationTask is the error to indicate failure to deserialize replication task
	ErrDeserializeReplicationTask = &shared.BadRequestError{Message: "Failed to deserialize replication task"}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	PersistenceMaxQPS                  dynamicconfig.IntPropertyFn
	ReplicatorMetaTaskConcurrency      dynamicconfig.IntPropertyFn
	ReplicatorTaskConcurrency          dynamicconfig.IntPropertyFn
	ReplicatorMessageConcurrency       dynamicconfig.IntPropertyFn
	ReplicatorActivityBufferRetryCount dynamicconfig.IntPropertyFn
	ReplicatorHistoryBufferRetryCount  dynamicconfig.IntPropertyFn
	ReplicationTaskMaxRetryCount       dynamicconfig.IntPropertyFn
	ReplicationTaskMaxRetryDuration    dynamicconfig.DurationPropertyFn
	ReplicationTaskContextTimeout      dynamicconfig.DurationPropertyFn
	ReReplicationContextTimeout        dynamicconfig.DurationPropertyFnWithDomainIDFilter
	EnableRPCReplication               dynamicconfig.BoolPropertyFn
}

Config contains all the replication config for worker

type Replicator

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

Replicator is the processor for replication tasks

func NewReplicator

func NewReplicator(
	clusterMetadata cluster.Metadata,
	metadataManagerV2 persistence.MetadataManager,
	domainCache cache.DomainCache,
	clientBean client.Bean,
	config *Config,
	client messaging.Client,
	logger log.Logger,
	metricsClient metrics.Client,
	hostInfo *membership.HostInfo,
	serviceResolver membership.ServiceResolver,
	domainReplicationQueue persistence.DomainReplicationQueue,
	domainReplicationTaskExecutor domain.ReplicationTaskExecutor,
) *Replicator

NewReplicator creates a new replicator for processing replication tasks

func (*Replicator) Start

func (r *Replicator) Start() error

Start is called to start replicator

func (*Replicator) Stop

func (r *Replicator) Stop()

Stop is called to stop replicator

Jump to

Keyboard shortcuts

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