Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // MaxBinlogSyncerReconnect is the max reconnection times for binlog syncer in go-mysql. MaxBinlogSyncerReconnect = 60 // SlaveReadTimeout is slave read binlog data timeout, ref: https://dev.mysql.com/doc/refman/8.0/en/replication-options-replica.html#sysvar_slave_net_timeout SlaveReadTimeout = 1 * time.Minute // MasterHeartbeatPeriod is the master server send heartbeat period, ref: `MASTER_HEARTBEAT_PERIOD` in https://dev.mysql.com/doc/refman/8.0/en/change-master-to.html MasterHeartbeatPeriod = 30 * time.Second )
Functions ¶
func SetDefaultReplicationCfg ¶
func SetDefaultReplicationCfg(cfg *replication.BinlogSyncerConfig, retryCount int)
SetDefaultReplicationCfg sets some default value for BinlogSyncerConfig Note: retryCount should be greater than 0, set retryCount = 1 if you want to disable retry sync.
Types ¶
Click to show internal directories.
Click to hide internal directories.