Documentation
¶
Index ¶
- func CloseDB(db *sql.DB) error
- func CreateDB(cfg types.DBConfig) (*sql.DB, error)
- func GetRunningDDLCount(db *sql.DB) (int, error)
- func GetRunningProcesses(db *sql.DB) ([]string, error)
- func GetServerUUID(db *sql.DB) (string, error)
- func GetSlaveStatus(db *sql.DB) (map[string]string, error)
- func GetTxnIDFromGTIDStr(gtidStr, serverUUID string) (int64, error)
- func KillProcess(db *sql.DB, pid string) error
- func PromoteToMaster(db *sql.DB, replicationUser string, mysqlNet string) error
- func RedirectMaster(db *sql.DB, replicationUser, replicationPassword, masterHost string, ...) error
- func Select1(db *sql.DB) error
- func SetReadOnly(db *sql.DB) error
- func SetReadWrite(db *sql.DB) error
- func WaitCatchMaster(db *sql.DB, gtid string) error
- type GTIDSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRunningDDLCount ¶
GetRunningDDLCount returns the count of ddls that are running
func GetRunningProcesses ¶
GetRunningProcesses get all running processes
func GetServerUUID ¶
GetServerUUID returns the uuid of current mysql server
func GetSlaveStatus ¶
GetSlaveStatus runs `show slave status` ans return the result as a map[string]string
func GetTxnIDFromGTIDStr ¶
GetTxnIDFromGTIDStr get the last txn id from the gtidset and serverUUID
func KillProcess ¶
KillProcess kill the process given the pid
func PromoteToMaster ¶
PromoteToMaster promotes the db to master
Types ¶
Click to show internal directories.
Click to hide internal directories.