Versions in this module Expand all Collapse all v1 v1.0.0 Jul 20, 2020 Changes in this version + const GTIDModeOff + const GTIDModeOn + const IOThreadType + const SQLThreadType + type Handler interface + ChangeMasterTo func(s *Server, m *Server) error + CheckGTIDMode func(slaves []*Server) error + FindBestSlaves func(slaves []*Server) ([]*Server, error) + Promote func(s *Server) error + WaitCatchMaster func(s *Server, m *Server) error + WaitRelayLogDone func(s *Server) error + type MariadbGTIDHandler struct + func (h *MariadbGTIDHandler) ChangeMasterTo(s *Server, m *Server) error + func (h *MariadbGTIDHandler) CheckGTIDMode(slaves []*Server) error + func (h *MariadbGTIDHandler) FindBestSlaves(slaves []*Server) ([]*Server, error) + func (h *MariadbGTIDHandler) Promote(s *Server) error + func (h *MariadbGTIDHandler) WaitCatchMaster(s *Server, m *Server) error + func (h *MariadbGTIDHandler) WaitRelayLogDone(s *Server) error + type MysqlGTIDHandler struct + func (h *MysqlGTIDHandler) ChangeMasterTo(s *Server, m *Server) error + func (h *MysqlGTIDHandler) CheckGTIDMode(slaves []*Server) error + func (h *MysqlGTIDHandler) FindBestSlaves(slaves []*Server) ([]*Server, error) + func (h *MysqlGTIDHandler) Promote(s *Server) error + func (h *MysqlGTIDHandler) WaitCatchMaster(s *Server, m *Server) error + func (h *MysqlGTIDHandler) WaitRelayLogDone(s *Server) error + type Server struct + Addr string + ReplUser User + User User + func Failover(flavor string, slaves []*Server) ([]*Server, error) + func NewServer(addr string, user User, replUser User) *Server + func (s *Server) Close() + func (s *Server) Execute(cmd string, args ...interface{}) (r *Result, err error) + func (s *Server) FetchSlaveExecutePos() (Position, error) + func (s *Server) FetchSlaveReadPos() (Position, error) + func (s *Server) LockTables() error + func (s *Server) MasterPosWait(pos Position, timeout int) error + func (s *Server) MasterStatus() (*Resultset, error) + func (s *Server) MysqlGTIDMode() (string, error) + func (s *Server) ResetMaster() error + func (s *Server) ResetSlave() error + func (s *Server) ResetSlaveALL() error + func (s *Server) SetReadonly(b bool) error + func (s *Server) SlaveStatus() (*Resultset, error) + func (s *Server) StartSlave() error + func (s *Server) StopSlave() error + func (s *Server) StopSlaveIOThread() error + func (s *Server) UnlockTables() error + type User struct + Name string + Password string