cmd

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: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RunModeIds = map[RunMode][]string{
	RunModeFull:            {"full"},
	RunModeSnapshotOnly:    {"snapshot-only"},
	RunModeIncrementalOnly: {"incremental-only"},
	RunModeCloud:           {"cloud"},
}

Functions

func NewBigQueryCmd

func NewBigQueryCmd() *cobra.Command

func NewDatabricksCmd

func NewDatabricksCmd() *cobra.Command

func NewGCSCmd

func NewGCSCmd() *cobra.Command

func NewRedshiftCmd

func NewRedshiftCmd() *cobra.Command

func NewS3Cmd

func NewS3Cmd() *cobra.Command

func NewSnowflakeCmd

func NewSnowflakeCmd() *cobra.Command

func Replicate

func Replicate(
	tidbConfig *tidbsql.TiDBConfig,
	tables []string,
	storageURI *url.URL,
	snapshotURI *url.URL,
	incrementURI *url.URL,
	snapshotConcurrency int,
	cdcHost string,
	cdcPort int,
	cdcFlushInterval time.Duration,
	cdcFileSize int64,
	snapConnectorMap map[string]coreinterfaces.Connector,
	increConnectorMap map[string]coreinterfaces.Connector,
	mode RunMode,
) error

Types

type RunMode

type RunMode enumflag.Flag
const (
	RunModeFull RunMode = iota
	RunModeSnapshotOnly
	RunModeIncrementalOnly
	RunModeCloud
)

type Stage

type Stage string

o => create changefeed => dump snapshot => load snapshot => incremental load

^                     ^                    ^ 				 ^
|			          |				       |				 |
+------ init ---------+ changefeed created + snapshot dumped + snapshot loaded --
const (
	StageInit              Stage = "init"
	StageChangefeedCreated Stage = "changefeed-created"
	StageSnapshotDumped    Stage = "snapshot-dumped"
	StageSnapshotLoaded    Stage = "snapshot-loaded"
)

func Export

func Export(
	tidbConfig *tidbsql.TiDBConfig,
	tables []string,
	storageURI *url.URL,
	snapshotURI *url.URL,
	incrementURI *url.URL,
	snapshotConcurrency int,
	cdcHost string,
	cdcPort int,
	cdcFlushInterval time.Duration,
	cdcFileSize int64,
	mode RunMode,
) (
	stage Stage,
	err error)

Jump to

Keyboard shortcuts

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