replicate

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CSVFileExtension = ".csv"
)

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,
) 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) Close added in v0.0.3

func (sess *IncrementReplicateSession) Close()

func (*IncrementReplicateSession) GenManifestFile added in v0.0.3

func (sess *IncrementReplicateSession) GenManifestFile(path string, size int64) error

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
	// contains filtered or unexported fields
}

func NewSnapshotReplicateSession

func NewSnapshotReplicateSession(
	ctx context.Context,
	dwConnector coreinterfaces.Connector,
	tidbConfig *tidbsql.TiDBConfig,
	sourceDatabase, sourceTable string,
	storageUri *url.URL,
	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