Documentation ¶
Index ¶
- Constants
- func LogDefautConfig() string
- func SetDBConfig(dbc *DBConfig)
- func SetExecuteConfig(cfg *ExecuteConfig)
- func SetStartConfig(cfg *CreateConfig)
- type CreateConfig
- func (this *CreateConfig) Check() error
- func (this *CreateConfig) EndInfoString() string
- func (this *CreateConfig) EndPostInfoRatherThan(otherEndFile string, otherEndPos uint64) bool
- func (this *CreateConfig) EndTimeRatherThan(otherEndTime string) (bool, error)
- func (this *CreateConfig) GetSaveDir() string
- func (this *CreateConfig) HaveEndPosInfo() bool
- func (this *CreateConfig) HaveEndTime() bool
- func (this *CreateConfig) HaveStartPosInfo() bool
- func (this *CreateConfig) HaveStartTime() bool
- func (this *CreateConfig) StartInfoString() string
- func (this *CreateConfig) StartPosInfoLessThan(otherStartFile string, otherStartPos uint64) bool
- func (this *CreateConfig) StartTimeLessThan(otherStartTime string) (bool, error)
- type DBConfig
- type ExecuteConfig
- type OfflineConfig
- type OfflineStatConfig
Constants ¶
View Source
const ( ENABLE_ROLLBACK_UPDATE = true ENABLE_ROLLBACK_INSERT = true ENABLE_ROLLBACK_DELETE = true SAVE_DIR = "rollback_sqls" )
View Source
const ( DB_HOST = "127.0.0.1" DB_PORT = 3306 DB_USERNAME = "root" DB_PASSWORD = "root" DB_SCHEMA = "" DB_AUTO_COMMIT = true DB_MAX_OPEN_CONNS = 8 DB_MAX_IDEL_CONNS = 8 DB_CHARSET = "utf8mb4" DB_TIMEOUT = 10 DB_PASSWORD_IS_DECRYPT = true SQL_LOG_BIN = true )
View Source
const DefaultOfflineStatSaveDir = "offline_stat_output"
View Source
const (
EXECUTE_PARALLER = 1
)
Variables ¶
This section is empty.
Functions ¶
func LogDefautConfig ¶
func LogDefautConfig() string
func SetExecuteConfig ¶
func SetExecuteConfig(cfg *ExecuteConfig)
func SetStartConfig ¶
func SetStartConfig(cfg *CreateConfig)
Types ¶
type CreateConfig ¶
type CreateConfig struct { StartLogFile string StartLogPos uint64 EndLogFile string EndLogPos uint64 StartTime string EndTime string RollbackSchemas []string RollbackTables []string ThreadID uint32 Now time.Time EnableRollbackUpdate bool EnableRollbackInsert bool EnableRollbackDelete bool SaveDir string MatchSqls []string // 使用sql语句来匹配需要查询的时间段或者 }
func NewStartConfig ¶
func NewStartConfig() *CreateConfig
func (*CreateConfig) Check ¶
func (this *CreateConfig) Check() error
func (*CreateConfig) EndInfoString ¶
func (this *CreateConfig) EndInfoString() string
func (*CreateConfig) EndPostInfoRatherThan ¶
func (this *CreateConfig) EndPostInfoRatherThan(otherEndFile string, otherEndPos uint64) bool
结束位点大于其他位点
func (*CreateConfig) EndTimeRatherThan ¶
func (this *CreateConfig) EndTimeRatherThan(otherEndTime string) (bool, error)
结束时间大于其他位点
func (*CreateConfig) StartInfoString ¶
func (this *CreateConfig) StartInfoString() string
func (*CreateConfig) StartPosInfoLessThan ¶
func (this *CreateConfig) StartPosInfoLessThan(otherStartFile string, otherStartPos uint64) bool
开始位点小于其他位点
func (*CreateConfig) StartTimeLessThan ¶
func (this *CreateConfig) StartTimeLessThan(otherStartTime string) (bool, error)
开始时间小于其他位点
type DBConfig ¶
type DBConfig struct { Username string Password string Database string CharSet string Host string Timeout int Port int MaxOpenConns int MaxIdelConns int AllowOldPasswords int AutoCommit bool PasswordIsDecrypt bool SqlLogBin bool }
func GetDBConfig ¶
func GetDBConfig() *DBConfig
func (*DBConfig) GetDataSource ¶
func (*DBConfig) GetSyncerConfig ¶
func (this *DBConfig) GetSyncerConfig() replication.BinlogSyncerConfig
type ExecuteConfig ¶
func (*ExecuteConfig) Check ¶
func (this *ExecuteConfig) Check() error
type OfflineConfig ¶
type OfflineConfig struct { BinlogFiles []string ThreadID uint32 Now time.Time EnableRollbackUpdate bool EnableRollbackInsert bool EnableRollbackDelete bool SaveDir string SchemaFile string // 建表语句 MatchSqls []string // 使用sql语句来匹配需要查询的时间段或者 }
func NewOffileConfig ¶
func NewOffileConfig() *OfflineConfig
func (*OfflineConfig) Check ¶
func (this *OfflineConfig) Check() error
type OfflineStatConfig ¶
func (*OfflineStatConfig) Check ¶
func (this *OfflineStatConfig) Check() error
func (*OfflineStatConfig) TableStatFilePath ¶
func (this *OfflineStatConfig) TableStatFilePath() string
func (*OfflineStatConfig) ThreadStatFilePath ¶
func (this *OfflineStatConfig) ThreadStatFilePath() string
func (*OfflineStatConfig) TimestampStatFilePath ¶
func (this *OfflineStatConfig) TimestampStatFilePath() string
func (*OfflineStatConfig) TransactionStatFilePath ¶
func (this *OfflineStatConfig) TransactionStatFilePath() string
Click to show internal directories.
Click to hide internal directories.