replicate

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CSVFileExtension = ".csv"
)
View Source
const (
	DataWarehouseLoadConcurrency = 16
)

Variables

This section is empty.

Functions

func StartReplicateIncrement

func StartReplicateIncrement(
	ctx context.Context,
	dwConnector coreinterfaces.Connector,
	tableFQN string,
	storageURI *url.URL,
	flushInterval time.Duration,
) error

func StartReplicateSnapshot

func StartReplicateSnapshot(
	ctx context.Context,
	dwConnector coreinterfaces.Connector,
	tableFQN string,
	tidbConfig *tidbsql.TiDBConfig,
	storageUri *url.URL,
	parrallelLoad bool,
) error

Types

type IncrementReplicateSession added in v0.0.3

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

func NewIncrementReplicateSession added in v0.0.3

func NewIncrementReplicateSession(
	ctx context.Context,
	dwConnector coreinterfaces.Connector,
	fileExtension string,
	storageURI *url.URL,
	tableFQN string,
	logger *zap.Logger,
) (*IncrementReplicateSession, error)

func (*IncrementReplicateSession) CheckpointExists added in v0.0.3

func (sess *IncrementReplicateSession) CheckpointExists(filePath string) bool

func (*IncrementReplicateSession) Run added in v0.0.3

func (sess *IncrementReplicateSession) Run(flushInterval time.Duration) error

type SnapshotReplicateSession

type SnapshotReplicateSession struct {
	TiDBConfig *tidbsql.TiDBConfig

	DataWarehousePool coreinterfaces.Connector
	TiDBPool          *sql.DB

	SourceDatabase string
	SourceTable    string

	StorageWorkspaceUri url.URL

	ParrallelLoad bool
	// contains filtered or unexported fields
}

func NewSnapshotReplicateSession

func NewSnapshotReplicateSession(
	ctx context.Context,
	dwConnector coreinterfaces.Connector,
	tidbConfig *tidbsql.TiDBConfig,
	sourceDatabase, sourceTable string,
	storageUri *url.URL,
	parrallelLoad bool,
	logger *zap.Logger,
) (*SnapshotReplicateSession, error)

func (*SnapshotReplicateSession) Close

func (sess *SnapshotReplicateSession) Close()

func (*SnapshotReplicateSession) Run

func (sess *SnapshotReplicateSession) Run() error

Jump to

Keyboard shortcuts

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