Versions in this module Expand all Collapse all v1 v1.0.55 Jan 12, 2024 v1.0.54 Oct 21, 2023 Changes in this version + const HTTPStatusOK + const MaxEventsBatchSize + func FileExists(fileName string) bool + func PrettifyDurationOutput(d time.Duration) string + func StringContainsAll(s string, substrings ...string) bool + func TouchFile(fileName string) error + func ValidateConnection(db *gosql.DB, connectionConfig *mysql.ConnectionConfig, ...) (string, error) + type ContextConfig struct + Client struct{ ... } + Osc struct{ ... } + type CutOver int + const CutOverAtomic + const CutOverTwoStep + type LoadMap map[string]int64 + func NewLoadMap() LoadMap + func ParseLoadMap(loadList string) (LoadMap, error) + func (this *LoadMap) Duplicate() LoadMap + func (this *LoadMap) String() string + type MigrationContext struct + AliyunRDS bool + AllEventsUpToLockProcessedInjectedFlag int64 + AllowedMasterMaster bool + AllowedRunningOnMaster bool + AlterStatement string + ApplierConnectionConfig *mysql.ConnectionConfig + ApplierMySQLVersion string + ApplierTimeZone string + ApproveRenamedColumns bool + AssumeMasterHostname string + AssumeRBR bool + ChunkSize int64 + CleanupImminentFlag int64 + CliMasterPassword string + CliMasterUser string + CliPassword string + CliUser string + ColumnRenameMap map[string]string + ConcurrentCountTableRows bool + ConfigFile string + CountTableRows bool + CountingRowsFlag int64 + CriticalLoadHibernateSeconds int64 + CriticalLoadIntervalMilliseconds int64 + CurrentLag int64 + CutOverCompleteFlag int64 + CutOverExponentialBackoff bool + CutOverLockTimeoutSeconds int64 + CutOverType CutOver + DMLBatchSize int64 + DatabaseName string + DiscardForeignKeys bool + DropServeSocket bool + DroppedColumnsMap map[string]bool + ExponentialBackoffMaxInterval int64 + ForceNamedCutOverCommand bool + ForceTmpTableName string + GhostTableColumns *sql.ColumnList + GhostTableUniqueKeys [](*sql.UniqueKey) + GhostTableVirtualColumns *sql.ColumnList + GoogleCloudPlatform bool + HasSuperPrivilege bool + HeartbeatIntervalMilliseconds int64 + HibernateUntil int64 + HooksHintMessage string + HooksHintOwner string + HooksHintToken string + HooksPath string + Hostname string + InCutOverCriticalSectionFlag int64 + InitiallyDropGhostTable bool + InitiallyDropOldTable bool + InspectorConnectionConfig *mysql.ConnectionConfig + InspectorMySQLVersion string + IsPostponingCutOver int64 + IsTungsten bool + Iteration int64 + LockTablesStartTime time.Time + MappedSharedColumns *sql.ColumnList + MaxLagMillisecondsThrottleThreshold int64 + MigrateOnReplica bool + MigrationIterationRangeMaxValues *sql.ColumnValues + MigrationIterationRangeMinValues *sql.ColumnValues + MigrationRangeMaxValues *sql.ColumnValues + MigrationRangeMinValues *sql.ColumnValues + Noop bool + NullableUniqueKeyAllowed bool + OkToDropTable bool + OriginalBinlogFormat string + OriginalBinlogRowImage string + OriginalTableColumns *sql.ColumnList + OriginalTableColumnsOnApplier *sql.ColumnList + OriginalTableName string + OriginalTableUniqueKeys [](*sql.UniqueKey) + OriginalTableVirtualColumns *sql.ColumnList + PanicAbort chan error + PanicFlagFile string + PostponeCutOverFlagFile string + RenameTablesEndTime time.Time + RenameTablesStartTime time.Time + ReplicaServerId uint + RowCopyEndTime time.Time + RowCopyStartTime time.Time + RowsDeltaEstimate int64 + RowsEstimate int64 + ServeSocketFile string + ServeTCPPort int64 + SharedColumns *sql.ColumnList + SkipForeignKeyChecks bool + SkipRenamedColumns bool + StartTime time.Time + SwitchToRowBinlogFormat bool + TLSAllowInsecure bool + TLSCACertificate string + TableEngine string + TestOnReplica bool + TestOnReplicaSkipReplicaStop bool + ThrottleAdditionalFlagFile string + ThrottleCommandedByUser int64 + ThrottleFlagFile string + ThrottleHTTPStatusCode int64 + TimestampOldTable bool + TotalDMLEventsApplied int64 + TotalRowsCopied int64 + UniqueKey *sql.UniqueKey + UseTLS bool + UsedRowsEstimateMethod RowsEstimateMethod + UserCommandedUnpostponeFlag int64 + Uuid string + func NewMigrationContext() *MigrationContext + func (this *MigrationContext) AddThrottleControlReplicaKey(key mysql.InstanceKey) error + func (this *MigrationContext) ApplyCredentials() + func (this *MigrationContext) ElapsedRowCopyTime() time.Duration + func (this *MigrationContext) ElapsedTime() time.Duration + func (this *MigrationContext) GetApplierHostname() string + func (this *MigrationContext) GetChangelogTableName() string + func (this *MigrationContext) GetControlReplicasLagResult() mysql.ReplicationLagResult + func (this *MigrationContext) GetCriticalLoad() LoadMap + func (this *MigrationContext) GetGhostTableName() string + func (this *MigrationContext) GetInspectorHostname() string + func (this *MigrationContext) GetIteration() int64 + func (this *MigrationContext) GetMaxLoad() LoadMap + func (this *MigrationContext) GetNiceRatio() float64 + func (this *MigrationContext) GetOldTableName() string + func (this *MigrationContext) GetProgressPct() int + func (this *MigrationContext) GetRecentBinlogCoordinates() mysql.BinlogCoordinates + func (this *MigrationContext) GetThrottleControlReplicaKeys() *mysql.InstanceKeyMap + func (this *MigrationContext) GetThrottleGeneralCheckResult() *ThrottleCheckResult + func (this *MigrationContext) GetThrottleHTTP() string + func (this *MigrationContext) GetThrottleQuery() string + func (this *MigrationContext) GetTotalRowsCopied() int64 + func (this *MigrationContext) GetVoluntaryLockName() string + func (this *MigrationContext) HasMigrationRange() bool + func (this *MigrationContext) InspectorIsAlsoApplier() bool + func (this *MigrationContext) IsThrottled() (bool, string, ThrottleReasonHint) + func (this *MigrationContext) IsTransactionalTable() bool + func (this *MigrationContext) MarkPointOfInterest() int64 + func (this *MigrationContext) MarkRowCopyEndTime() + func (this *MigrationContext) MarkRowCopyStartTime() + func (this *MigrationContext) MaxRetries() int64 + func (this *MigrationContext) ReadConfigFile() error + func (this *MigrationContext) ReadCriticalLoad(criticalLoadList string) error + func (this *MigrationContext) ReadMaxLoad(maxLoadList string) error + func (this *MigrationContext) ReadThrottleControlReplicaKeys(throttleControlReplicas string) error + func (this *MigrationContext) RequiresBinlogFormatChange() bool + func (this *MigrationContext) SetChunkSize(chunkSize int64) + func (this *MigrationContext) SetControlReplicasLagResult(lagResult *mysql.ReplicationLagResult) + func (this *MigrationContext) SetCutOverLockTimeoutSeconds(timeoutSeconds int64) error + func (this *MigrationContext) SetDMLBatchSize(batchSize int64) + func (this *MigrationContext) SetDefaultNumRetries(retries int64) + func (this *MigrationContext) SetExponentialBackoffMaxInterval(intervalSeconds int64) error + func (this *MigrationContext) SetHeartbeatIntervalMilliseconds(heartbeatIntervalMilliseconds int64) + func (this *MigrationContext) SetMaxLagMillisecondsThrottleThreshold(maxLagMillisecondsThrottleThreshold int64) + func (this *MigrationContext) SetNiceRatio(newRatio float64) + func (this *MigrationContext) SetProgressPct(progressPct float64) + func (this *MigrationContext) SetRecentBinlogCoordinates(coordinates mysql.BinlogCoordinates) + func (this *MigrationContext) SetThrottleGeneralCheckResult(checkResult *ThrottleCheckResult) *ThrottleCheckResult + func (this *MigrationContext) SetThrottleHTTP(throttleHTTP string) + func (this *MigrationContext) SetThrottleQuery(newQuery string) + func (this *MigrationContext) SetThrottled(throttle bool, reason string, reasonHint ThrottleReasonHint) + func (this *MigrationContext) SetupTLS() error + func (this *MigrationContext) TimeSincePointOfInterest() time.Duration + type RowsEstimateMethod string + const CountRowsEstimate + const ExplainRowsEstimate + const TableStatusRowsEstimate + type ThrottleCheckResult struct + Reason string + ReasonHint ThrottleReasonHint + ShouldThrottle bool + func NewThrottleCheckResult(throttle bool, reason string, reasonHint ThrottleReasonHint) *ThrottleCheckResult + type ThrottleReasonHint string + const LeavingHibernationThrottleReasonHint + const NoThrottleReasonHint + const UserCommandThrottleReasonHint