Versions in this module Expand all Collapse all v1 v1.0.0 Aug 23, 2023 v0 v0.1.0 Aug 23, 2023 Changes in this version + const BackendLocal + const BackendTiDB + const BufferSizeScale + const CheckpointDriverFile + const CheckpointDriverMySQL + const DefaultBatchSize + const ErrorOnDup + const IgnoreOnDup + const ImportMode + const MaxRegionSize + const MaxSplitRegionSizeRatio + const NormalMode + const ReadBlockSize + const ReplaceOnDup + const SplitRegionKeys + const SplitRegionSize + func GetDefaultFilter() []string + type AllIgnoreColumns []*IgnoreColumns + func (igCols AllIgnoreColumns) GetIgnoreColumns(db string, table string, caseSensitive bool) (*IgnoreColumns, error) + type ByteSize int64 + func (size *ByteSize) UnmarshalJSON(b []byte) error + func (size *ByteSize) UnmarshalText(b []byte) error + type CSVConfig struct + BackslashEscape bool + Delimiter string + Header bool + NotNull bool + Null string + Separator string + Terminator string + TrimLastSep bool + type Charset int + const Binary + const GB18030 + const GBK + const UTF8MB4 + func ParseCharset(dataCharacterSet string) (Charset, error) + func (c Charset) String() string + type Checkpoint struct + DSN string + Driver string + Enable bool + KeepAfterSuccess CheckpointKeepStrategy + MySQLParam *common.MySQLConnectParam + Schema string + type CheckpointKeepStrategy int + const CheckpointOrigin + const CheckpointRemove + const CheckpointRename + func (t *CheckpointKeepStrategy) FromStringValue(s string) error + func (t *CheckpointKeepStrategy) MarshalJSON() ([]byte, error) + func (t *CheckpointKeepStrategy) UnmarshalJSON(data []byte) error + func (t *CheckpointKeepStrategy) UnmarshalTOML(v interface{}) error + func (t CheckpointKeepStrategy) MarshalText() ([]byte, error) + func (t CheckpointKeepStrategy) String() string + type Config struct + App Lightning + BWList filter.MySQLReplicationRules + Checkpoint Checkpoint + Cron Cron + Mydumper MydumperRuntime + PostRestore PostRestore + Routes []*router.TableRule + Security Security + TaskID int64 + TiDB DBStore + TikvImporter TikvImporter + func NewConfig() *Config + func (cfg *Config) Adjust(ctx context.Context) error + func (cfg *Config) AdjustCheckPoint() + func (cfg *Config) AdjustCommon() (bool, error) + func (cfg *Config) AdjustMydumper() + func (cfg *Config) CheckAndAdjustFilePath() error + func (cfg *Config) CheckAndAdjustForLocalBackend() error + func (cfg *Config) CheckAndAdjustSecurity() error + func (cfg *Config) CheckAndAdjustTiDBPort(ctx context.Context, mustHaveInternalConnections bool) error + func (cfg *Config) DefaultVarsForImporterAndLocalBackend() + func (cfg *Config) DefaultVarsForTiDBBackend() + func (cfg *Config) HasLegacyBlackWhiteList() bool + func (cfg *Config) LoadFromGlobal(global *GlobalConfig) error + func (cfg *Config) LoadFromTOML(data []byte) error + func (cfg *Config) String() string + func (cfg *Config) ToTLS() (*common.TLS, error) + type Cron struct + CheckDiskQuota Duration + LogProgress Duration + SwitchMode Duration + type DBStore struct + BuildStatsConcurrency int + ChecksumTableConcurrency int + DistSQLScanConcurrency int + Host string + IndexSerialScanConcurrency int + MaxAllowedPacket uint64 + PdAddr string + Port int + Psw string + SQLMode mysql.SQLMode + Security *Security + StatusPort int + StrSQLMode string + TLS string + User string + Vars map[string]string + type DuplicateResolutionAlgorithm int + const DupeResAlgErr + const DupeResAlgNone + const DupeResAlgRecord + const DupeResAlgRemove + func (dra *DuplicateResolutionAlgorithm) FromStringValue(s string) error + func (dra *DuplicateResolutionAlgorithm) MarshalJSON() ([]byte, error) + func (dra *DuplicateResolutionAlgorithm) UnmarshalJSON(data []byte) error + func (dra *DuplicateResolutionAlgorithm) UnmarshalTOML(v interface{}) error + func (dra DuplicateResolutionAlgorithm) MarshalText() ([]byte, error) + func (dra DuplicateResolutionAlgorithm) String() string + type Duration struct + func (d *Duration) MarshalJSON() ([]byte, error) + func (d *Duration) UnmarshalText(text []byte) error + func (d Duration) MarshalText() ([]byte, error) + type FileRouteRule struct + Compression string + Key string + Path string + Pattern string + Schema string + Table string + Type string + Unescape bool + type GlobalCheckpoint struct + Enable bool + type GlobalConfig struct + App GlobalLightning + Checkpoint GlobalCheckpoint + ConfigFileContent []byte + Mydumper GlobalMydumper + PostRestore GlobalPostRestore + Security Security + TiDB GlobalTiDB + TikvImporter GlobalImporter + func LoadGlobalConfig(args []string, extraFlags func(*flag.FlagSet)) (*GlobalConfig, error) + func Must(cfg *GlobalConfig, err error) *GlobalConfig + func NewGlobalConfig() *GlobalConfig + type GlobalImporter struct + Backend string + SortedKVDir string + type GlobalLightning struct + CheckRequirements bool + PProfPort int + ServerMode bool + StatusAddr string + type GlobalMydumper struct + Filter []string + IgnoreColumns []*IgnoreColumns + NoSchema bool + SourceDir string + type GlobalPostRestore struct + Analyze PostOpLevel + Checksum PostOpLevel + type GlobalTiDB struct + Host string + LogLevel string + PdAddr string + Port int + Psw string + StatusPort int + User string + type IgnoreColumns struct + Columns []string + DB string + Table string + TableFilter []string + func (ic *IgnoreColumns) ColumnsMap() map[string]struct{} + type Lightning struct + CheckRequirements bool + IOConcurrency int + IndexConcurrency int + MaxError MaxError + MetaSchemaName string + RegionConcurrency int + TableConcurrency int + TaskInfoSchemaName string + type List struct + func NewConfigList() *List + func (cl *List) AllIDs() []int64 + func (cl *List) Get(taskID int64) (*Config, bool) + func (cl *List) MoveToBack(taskID int64) bool + func (cl *List) MoveToFront(taskID int64) bool + func (cl *List) Pop(ctx context.Context) (*Config, error) + func (cl *List) Push(cfg *Config) + func (cl *List) Remove(taskID int64) bool + type MaxError struct + Charset atomic.Int64 + Conflict atomic.Int64 + Syntax atomic.Int64 + Type atomic.Int64 + func (cfg *MaxError) UnmarshalTOML(v interface{}) error + type MydumperRuntime struct + BatchImportRatio float64 + BatchSize ByteSize + CSV CSVConfig + CaseSensitive bool + CharacterSet string + DataCharacterSet string + DataInvalidCharReplace string + DefaultFileRules bool + FileRouters []*FileRouteRule + Filter []string + IgnoreColumns AllIgnoreColumns + MaxRegionSize ByteSize + NoSchema bool + ReadBlockSize ByteSize + SourceDir string + SourceID string + StrictFormat bool + type PostOpLevel int + const OpLevelOff + const OpLevelOptional + const OpLevelRequired + func (t *PostOpLevel) FromStringValue(s string) error + func (t *PostOpLevel) MarshalJSON() ([]byte, error) + func (t *PostOpLevel) UnmarshalJSON(data []byte) error + func (t *PostOpLevel) UnmarshalTOML(v interface{}) error + func (t PostOpLevel) MarshalText() ([]byte, error) + func (t PostOpLevel) String() string + type PostRestore struct + Analyze PostOpLevel + Checksum PostOpLevel + Compact bool + Level1Compact bool + PostProcessAtLast bool + type Security struct + CABytes []byte + CAPath string + CertBytes []byte + CertPath string + KeyBytes []byte + KeyPath string + RedactInfoLog bool + TLSConfigName string + func (sec *Security) DeregisterMySQL() + func (sec *Security) RegisterMySQL() error + type TikvImporter struct + Addr string + Backend string + DiskQuota ByteSize + DuplicateResolution DuplicateResolutionAlgorithm + EngineMemCacheSize ByteSize + IncrementalImport bool + LocalWriterMemCacheSize ByteSize + MaxKVPairs int + OnDuplicate string + RangeConcurrency int + RegionSplitKeys int + RegionSplitSize ByteSize + SendKVPairs int + SortedKVDir string + StoreWriteBWLimit ByteSize