Documentation ¶
Overview ¶
replication-manager - Replication Manager Monitoring and CLI for MariaDB and MySQL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <stephane.varoqui@mariadb.com>
This source code is licensed under the GNU General Public License, version 3. Redistribution/Reuse of this code is permitted under the GNU v3 license, as an additional term, ALL code must carry the original Author(s) credit in comment form. See LICENSE in this directory for the integral text.
display.go
replication-manager - Replication Manager Monitoring and CLI for MariaDB and MySQL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <stephane.varoqui@mariadb.com>
This source code is licensed under the GNU General Public License, version 3. Redistribution/Reuse of this code is permitted under the GNU v3 license, as an additional term, ALL code must carry the original Author(s) credit in comment form. See LICENSE in this directory for the integral text.
replication-manager - Replication Manager Monitoring and CLI for MariaDB and MySQL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <stephane.varoqui@mariadb.com>
This source code is licensed under the GNU General Public License, version 3. Redistribution/Reuse of this code is permitted under the GNU v3 license, as an additional term, ALL code must carry the original Author(s) credit in comment form. See LICENSE in this directory for the integral text.
replication-manager - Replication Manager Monitoring and CLI for MariaDB and MySQL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <stephane.varoqui@mariadb.com>
This source code is licensed under the GNU General Public License, version 3. Redistribution/Reuse of this code is permitted under the GNU v3 license, as an additional term, ALL code must carry the original Author(s) credit in comment form. See LICENSE in this directory for the integral text.
replication-manager - Replication Manager Monitoring and CLI for MariaDB and MySQL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <stephane.varoqui@mariadb.com>
This source code is licensed under the GNU General Public License, version 3. Redistribution/Reuse of this code is permitted under the GNU v3 license, as an additional term, ALL code must carry the original Author(s) credit in comment form. See LICENSE in this directory for the integral text.
replication-manager - Replication Manager Monitoring and CLI for MariaDB and MySQL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <stephane.varoqui@mariadb.com>
This source code is licensed under the GNU General Public License, version 3. Redistribution/Reuse of this code is permitted under the GNU v3 license, as an additional term, ALL code must carry the original Author(s) credit in comment form. See LICENSE in this directory for the integral text.
Index ¶
- type Cluster
- func (cluster *Cluster) AddSeededServer(srv string) error
- func (cluster *Cluster) Bootstrap() error
- func (cluster *Cluster) BootstrapReplication() error
- func (cluster *Cluster) BootstrapReplicationCleanup() error
- func (cluster *Cluster) BootstrapServices() error
- func (cluster *Cluster) CheckFailed()
- func (cluster *Cluster) CheckSlavesRunning() bool
- func (cluster *Cluster) CheckTableConsistency(table string) bool
- func (cluster *Cluster) ChecksumBench() bool
- func (cluster *Cluster) CleanupBench() error
- func (cluster *Cluster) Close()
- func (cluster *Cluster) CloseTestCluster(conf string, test *Test) bool
- func (cluster *Cluster) CountFailed(s []*ServerMonitor) int
- func (cluster *Cluster) DelayAllSlaves() error
- func (cluster *Cluster) DisableSemisync() error
- func (cluster *Cluster) DisplayHelp()
- func (cluster *Cluster) EnableSemisync() error
- func (cluster *Cluster) FailoverAndWait()
- func (cluster *Cluster) FailoverForce() error
- func (cluster *Cluster) ForgetTopology() error
- func (cluster *Cluster) FoundDatabaseAgent(server *ServerMonitor) (opensvc.Host, error)
- func (cluster *Cluster) FoundProxyAgent(proxy *Proxy) (opensvc.Host, error)
- func (cluster *Cluster) GenerateDBTemplate(collector opensvc.Collector, servers []string, ports []string, ...) (string, error)
- func (cluster *Cluster) GetClusterProxyConn() (*sqlx.DB, error)
- func (cluster *Cluster) GetClusterThisProxyConn(prx *Proxy) (*sqlx.DB, error)
- func (cluster *Cluster) GetConf() config.Config
- func (cluster *Cluster) GetCrashes() crashList
- func (cluster *Cluster) GetDbPass() string
- func (cluster *Cluster) GetDbUser() string
- func (cluster *Cluster) GetDockerDiskTemplate(collector opensvc.Collector) string
- func (cluster *Cluster) GetFailSync() bool
- func (cluster *Cluster) GetFailoverCtr() int
- func (cluster *Cluster) GetFailoverTs() int64
- func (cluster *Cluster) GetHaproxyTemplate(collector opensvc.Collector, servers string, agent opensvc.Host, prx *Proxy) (string, error)
- func (cluster *Cluster) GetLogLevel() int
- func (cluster *Cluster) GetMaster() *ServerMonitor
- func (cluster *Cluster) GetMasterFailCount() int
- func (cluster *Cluster) GetMasterFromReplication(s *ServerMonitor) (*ServerMonitor, error)
- func (cluster *Cluster) GetMaxFail() int
- func (cluster *Cluster) GetMaxscaleTemplate(collector opensvc.Collector, servers string, agent opensvc.Host, prx *Proxy) (string, error)
- func (cluster *Cluster) GetName() string
- func (cluster *Cluster) GetOpenSVCSeviceStatus() (int, error)
- func (cluster *Cluster) GetPodDiskTemplate(collector opensvc.Collector, pod string) string
- func (cluster *Cluster) GetPodDockerDBTemplate(collector opensvc.Collector, pod string) string
- func (cluster *Cluster) GetPodDockerHaproxyTemplate(collector opensvc.Collector, pod string) string
- func (cluster *Cluster) GetPodDockerMaxscaleTemplate(collector opensvc.Collector, pod string) string
- func (cluster *Cluster) GetPodDockerProxysqlTemplate(collector opensvc.Collector, pod string) string
- func (cluster *Cluster) GetPodNetTemplate(collector opensvc.Collector, pod string, i int) string
- func (cluster *Cluster) GetPodPackageTemplate(collector opensvc.Collector, pod string) string
- func (cluster *Cluster) GetProxies() proxyList
- func (cluster *Cluster) GetProxyFromName(name string) *Proxy
- func (cluster *Cluster) GetRejoin() bool
- func (cluster *Cluster) GetRejoinBackupBinlog() bool
- func (cluster *Cluster) GetRejoinDump() bool
- func (cluster *Cluster) GetRejoinFlashback() bool
- func (cluster *Cluster) GetRejoinSemisync() bool
- func (cluster *Cluster) GetRelayServer() *ServerMonitor
- func (cluster *Cluster) GetRplChecks() bool
- func (cluster *Cluster) GetRunStatus() string
- func (cluster *Cluster) GetServerFromId(serverid uint) *ServerMonitor
- func (cluster *Cluster) GetServerFromName(name string) *ServerMonitor
- func (cluster *Cluster) GetServers() serverList
- func (cluster *Cluster) GetSlaves() serverList
- func (cluster *Cluster) GetStateMachine() *state.StateMachine
- func (cluster *Cluster) GetSwitchSync() bool
- func (cluster *Cluster) GetTestMode() bool
- func (cluster *Cluster) GetTopology() string
- func (cluster *Cluster) GetTraffic() bool
- func (cluster *Cluster) GetWaitTrx() int64
- func (cluster *Cluster) Init(conf config.Config, cfgGroup string, tlog *termlog.TermLog, termlength int, ...) error
- func (cluster *Cluster) InitAgent(conf config.Config) (*sqlx.DB, error)
- func (cluster *Cluster) InitBenchTable() error
- func (cluster *Cluster) InitClusterSemiSync() error
- func (cluster *Cluster) InitDatabaseService(server *ServerMonitor) error
- func (cluster *Cluster) InitProxyService(prx *Proxy) error
- func (cluster *Cluster) InitTestCluster(conf string, test *Test) bool
- func (cluster *Cluster) InjectTraffic()
- func (cluster *Cluster) IsMasterFailed() bool
- func (cluster *Cluster) LocalhostProvisionDatabaseService(server *ServerMonitor) error
- func (cluster *Cluster) LocalhostProvisionDatabases() error
- func (cluster *Cluster) LocalhostStartDatabaseService(server *ServerMonitor) error
- func (cluster *Cluster) LocalhostStopDatabaseService(server *ServerMonitor) error
- func (cluster *Cluster) LocalhostUnprovision() error
- func (cluster *Cluster) LocalhostUnprovisionDatabaseService(server *ServerMonitor) error
- func (cluster *Cluster) LogPrint(msg ...interface{})
- func (cluster *Cluster) LogPrintf(level string, format string, args ...interface{})
- func (cluster *Cluster) LostMajority() bool
- func (cluster *Cluster) MasterFailover(fail bool) bool
- func (cluster *Cluster) OpenSVCConnect() opensvc.Collector
- func (cluster *Cluster) OpenSVCProvisionCluster() error
- func (cluster *Cluster) OpenSVCProvisionDatabaseService(s *ServerMonitor) error
- func (cluster *Cluster) OpenSVCProvisionOneSrv() error
- func (cluster *Cluster) OpenSVCProvisionOneSrvPerDB() error
- func (cluster *Cluster) OpenSVCProvisionProxies() error
- func (cluster *Cluster) OpenSVCProvisionProxyService(prx *Proxy) error
- func (cluster *Cluster) OpenSVCStartService(server *ServerMonitor) error
- func (cluster *Cluster) OpenSVCStopDatabaseService(server *ServerMonitor) error
- func (cluster *Cluster) OpenSVCUnprovision()
- func (cluster *Cluster) OpenSVCUnprovisionDatabaseService(db *ServerMonitor)
- func (cluster *Cluster) OpenSVCUnprovisionProxyService(prx *Proxy)
- func (cluster *Cluster) OpenSVCWaitDequeue(svc opensvc.Collector, idaction int)
- func (cluster *Cluster) PrepareBench() error
- func (cluster *Cluster) PrintTopology()
- func (cluster *Cluster) RejoinMysqldump(source *ServerMonitor, dest *ServerMonitor) error
- func (cluster *Cluster) ReloadConfig(conf config.Config)
- func (cluster *Cluster) ReloadFromSave() error
- func (cluster *Cluster) ResetFailoverCtr()
- func (cluster *Cluster) RestoreConf()
- func (cluster *Cluster) RollingUpgrade()
- func (cluster *Cluster) Run()
- func (cluster *Cluster) RunBench() error
- func (cluster *Cluster) RunSysbench() error
- func (cluster *Cluster) Save() error
- func (cluster *Cluster) SetActiveStatus(status string)
- func (cluster *Cluster) SetBenchMethod(m string)
- func (cluster *Cluster) SetBinlogServer(binlogserver bool)
- func (cluster *Cluster) SetCfgGroupDisplay(cfgGroup string)
- func (cluster *Cluster) SetCheckFalsePositiveHeartbeat(CheckFalsePositiveHeartbeat bool)
- func (cluster *Cluster) SetCleanAll(check bool)
- func (cluster *Cluster) SetFailLimit(limit int)
- func (cluster *Cluster) SetFailRestartUnsafe(check bool)
- func (cluster *Cluster) SetFailSync(check bool)
- func (cluster *Cluster) SetFailTime(time int64)
- func (cluster *Cluster) SetFailoverCtr(failoverCtr int)
- func (cluster *Cluster) SetFailoverTs(failoverTs int64)
- func (cluster *Cluster) SetForceSlaveNoGtid(forceslavenogtid bool)
- func (cluster *Cluster) SetInteractive(check bool)
- func (cluster *Cluster) SetLogLevel(level int)
- func (cluster *Cluster) SetLogStdout()
- func (cluster *Cluster) SetMaintenance(serverid string)
- func (cluster *Cluster) SetMasterReadOnly()
- func (cluster *Cluster) SetMasterStateFailed()
- func (cluster *Cluster) SetMultiMaster(multimaster bool)
- func (cluster *Cluster) SetMultiTierSlave(multitierslave bool)
- func (cluster *Cluster) SetPrefMaster(PrefMaster string)
- func (cluster *Cluster) SetReadOnly(check bool)
- func (cluster *Cluster) SetRejoin(check bool)
- func (cluster *Cluster) SetRejoinBackupBinlog(check bool)
- func (cluster *Cluster) SetRejoinDump(check bool)
- func (cluster *Cluster) SetRejoinFlashback(check bool)
- func (cluster *Cluster) SetRejoinSemisync(check bool)
- func (cluster *Cluster) SetRplChecks(check bool)
- func (cluster *Cluster) SetRplMaxDelay(delay int64)
- func (cluster *Cluster) SetSlavesReadOnly(check bool)
- func (cluster *Cluster) SetSwitchSync(check bool)
- func (cluster *Cluster) SetTestMode(check bool)
- func (cluster *Cluster) SetTestStartCluster(check bool)
- func (cluster *Cluster) SetTestStopCluster(check bool)
- func (cluster *Cluster) SetTraffic(traffic bool)
- func (cluster *Cluster) ShutdownDatabase(server *ServerMonitor) error
- func (cluster *Cluster) SpiderSetShardsRepl()
- func (cluster *Cluster) SpiderShardsDiscovery()
- func (cluster *Cluster) StartAllNodes() error
- func (cluster *Cluster) StartDatabaseService(server *ServerMonitor) error
- func (cluster *Cluster) StartSlaves() error
- func (cluster *Cluster) Stop()
- func (cluster *Cluster) StopDatabaseService(server *ServerMonitor) error
- func (cluster *Cluster) StopSlaves() error
- func (cluster *Cluster) SwitchCleanAll()
- func (cluster *Cluster) SwitchFailSync()
- func (cluster *Cluster) SwitchOver()
- func (cluster *Cluster) SwitchReadOnly()
- func (cluster *Cluster) SwitchRejoin()
- func (cluster *Cluster) SwitchRejoinBackupBinlog()
- func (cluster *Cluster) SwitchRejoinDump()
- func (cluster *Cluster) SwitchRejoinFlashback()
- func (cluster *Cluster) SwitchRejoinSemisync()
- func (cluster *Cluster) SwitchRplChecks()
- func (cluster *Cluster) SwitchSwitchoverSync()
- func (cluster *Cluster) SwitchVerbosity()
- func (cluster *Cluster) SwitchoverWaitTest()
- func (cluster *Cluster) ToggleInteractive()
- func (cluster *Cluster) TopologyClusterDown() bool
- func (cluster *Cluster) TopologyDiscover() error
- func (cluster *Cluster) Unprovision()
- func (cluster *Cluster) UnprovisionDatabaseService(server *ServerMonitor) error
- func (cluster *Cluster) UnprovisionProxyService(prx *Proxy) error
- func (cluster *Cluster) WaitBootstrapDiscovery() error
- func (cluster *Cluster) WaitClusterStop() error
- func (cluster *Cluster) WaitDatabaseStart(server *ServerMonitor) error
- func (cluster *Cluster) WaitFailover(wg *sync.WaitGroup)
- func (cluster *Cluster) WaitFailoverEnd() error
- func (cluster *Cluster) WaitFailoverEndState()
- func (cluster *Cluster) WaitMariaDBStop(server *ServerMonitor) error
- func (cluster *Cluster) WaitRejoin(wg *sync.WaitGroup)
- func (cluster *Cluster) WaitSwitchover(wg *sync.WaitGroup)
- type Crash
- type Proxy
- type ServerMonitor
- func (server *ServerMonitor) Close()
- func (server *ServerMonitor) HasCycling(ServerID uint) bool
- func (server *ServerMonitor) HasSiblings(sib []*ServerMonitor) bool
- func (server *ServerMonitor) HasSlaves(sib []*ServerMonitor) bool
- func (server *ServerMonitor) IsDown() bool
- func (server *ServerMonitor) IsIgnored() bool
- func (server *ServerMonitor) ReadAllRelayLogs() error
- func (server *ServerMonitor) Refresh() error
- func (server *ServerMonitor) RejoinMaster() error
- func (server *ServerMonitor) RejoinMasterSST() error
- func (server *ServerMonitor) UsedGtidAtElection(crash *Crash) bool
- type Test
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { CleanAll bool // contains filtered or unexported fields }
func (*Cluster) AddSeededServer ¶
func (*Cluster) BootstrapReplication ¶
func (*Cluster) BootstrapReplicationCleanup ¶
func (*Cluster) BootstrapServices ¶
func (*Cluster) CheckFailed ¶
func (cluster *Cluster) CheckFailed()
func (*Cluster) CheckSlavesRunning ¶
func (*Cluster) CheckTableConsistency ¶
func (*Cluster) ChecksumBench ¶
func (*Cluster) CleanupBench ¶
func (*Cluster) CloseTestCluster ¶
func (*Cluster) CountFailed ¶
func (cluster *Cluster) CountFailed(s []*ServerMonitor) int
CountFailed Count number of failed node
func (*Cluster) DelayAllSlaves ¶
func (*Cluster) DisableSemisync ¶
func (*Cluster) DisplayHelp ¶
func (cluster *Cluster) DisplayHelp()
func (*Cluster) EnableSemisync ¶
func (*Cluster) FailoverAndWait ¶
func (cluster *Cluster) FailoverAndWait()
func (*Cluster) FailoverForce ¶
func (*Cluster) ForgetTopology ¶
func (*Cluster) FoundDatabaseAgent ¶
func (cluster *Cluster) FoundDatabaseAgent(server *ServerMonitor) (opensvc.Host, error)
func (*Cluster) FoundProxyAgent ¶
func (*Cluster) GenerateDBTemplate ¶
func (*Cluster) GetClusterProxyConn ¶
func (*Cluster) GetClusterThisProxyConn ¶
func (*Cluster) GetCrashes ¶
func (cluster *Cluster) GetCrashes() crashList
GetCrashes return crashes
func (*Cluster) GetDockerDiskTemplate ¶
func (*Cluster) GetFailSync ¶
func (*Cluster) GetFailoverCtr ¶
func (*Cluster) GetFailoverTs ¶
func (*Cluster) GetHaproxyTemplate ¶
func (*Cluster) GetLogLevel ¶
func (*Cluster) GetMaster ¶
func (cluster *Cluster) GetMaster() *ServerMonitor
func (*Cluster) GetMasterFailCount ¶
func (*Cluster) GetMasterFromReplication ¶
func (cluster *Cluster) GetMasterFromReplication(s *ServerMonitor) (*ServerMonitor, error)
func (*Cluster) GetMaxFail ¶
func (*Cluster) GetMaxscaleTemplate ¶
func (*Cluster) GetOpenSVCSeviceStatus ¶
OpenSVCSeviceStatus 0 not provision , 1 prov and up ,2 on error error
func (*Cluster) GetPodDiskTemplate ¶
func (*Cluster) GetPodDockerDBTemplate ¶
func (*Cluster) GetPodDockerHaproxyTemplate ¶
func (*Cluster) GetPodDockerMaxscaleTemplate ¶
func (*Cluster) GetPodDockerProxysqlTemplate ¶
func (*Cluster) GetPodNetTemplate ¶
func (*Cluster) GetPodPackageTemplate ¶
func (*Cluster) GetProxies ¶
func (cluster *Cluster) GetProxies() proxyList
func (*Cluster) GetProxyFromName ¶
func (*Cluster) GetRejoinBackupBinlog ¶
func (*Cluster) GetRejoinDump ¶
func (*Cluster) GetRejoinFlashback ¶
func (*Cluster) GetRejoinSemisync ¶
func (*Cluster) GetRelayServer ¶
func (cluster *Cluster) GetRelayServer() *ServerMonitor
func (*Cluster) GetRplChecks ¶
func (*Cluster) GetRunStatus ¶
func (*Cluster) GetServerFromId ¶
func (cluster *Cluster) GetServerFromId(serverid uint) *ServerMonitor
func (*Cluster) GetServerFromName ¶
func (cluster *Cluster) GetServerFromName(name string) *ServerMonitor
func (*Cluster) GetServers ¶
func (cluster *Cluster) GetServers() serverList
func (*Cluster) GetStateMachine ¶
func (cluster *Cluster) GetStateMachine() *state.StateMachine
func (*Cluster) GetSwitchSync ¶
func (*Cluster) GetTestMode ¶
func (*Cluster) GetTopology ¶
func (*Cluster) GetTraffic ¶
func (*Cluster) GetWaitTrx ¶
func (*Cluster) Init ¶
func (cluster *Cluster) Init(conf config.Config, cfgGroup string, tlog *termlog.TermLog, termlength int, runUUID string, repmgrVersion string, repmgrHostname string, key []byte) error
Init initial cluster definition
func (*Cluster) InitBenchTable ¶
func (*Cluster) InitClusterSemiSync ¶
func (*Cluster) InitDatabaseService ¶
func (cluster *Cluster) InitDatabaseService(server *ServerMonitor) error
func (*Cluster) InitProxyService ¶
func (*Cluster) InitTestCluster ¶
func (*Cluster) InjectTraffic ¶
func (cluster *Cluster) InjectTraffic()
func (*Cluster) IsMasterFailed ¶
func (*Cluster) LocalhostProvisionDatabaseService ¶
func (cluster *Cluster) LocalhostProvisionDatabaseService(server *ServerMonitor) error
func (*Cluster) LocalhostProvisionDatabases ¶
func (*Cluster) LocalhostStartDatabaseService ¶
func (cluster *Cluster) LocalhostStartDatabaseService(server *ServerMonitor) error
func (*Cluster) LocalhostStopDatabaseService ¶
func (cluster *Cluster) LocalhostStopDatabaseService(server *ServerMonitor) error
func (*Cluster) LocalhostUnprovision ¶
func (*Cluster) LocalhostUnprovisionDatabaseService ¶
func (cluster *Cluster) LocalhostUnprovisionDatabaseService(server *ServerMonitor) error
func (*Cluster) LostMajority ¶
LostMajority should be call in case of splitbrain to set maintenance mode
func (*Cluster) MasterFailover ¶
MasterFailover triggers a master switchover and returns the new master URL
func (*Cluster) OpenSVCConnect ¶
func (*Cluster) OpenSVCProvisionCluster ¶
func (*Cluster) OpenSVCProvisionDatabaseService ¶
func (cluster *Cluster) OpenSVCProvisionDatabaseService(s *ServerMonitor) error
func (*Cluster) OpenSVCProvisionOneSrv ¶
func (*Cluster) OpenSVCProvisionOneSrvPerDB ¶
func (*Cluster) OpenSVCProvisionProxies ¶
func (*Cluster) OpenSVCProvisionProxyService ¶
func (*Cluster) OpenSVCStartService ¶
func (cluster *Cluster) OpenSVCStartService(server *ServerMonitor) error
func (*Cluster) OpenSVCStopDatabaseService ¶
func (cluster *Cluster) OpenSVCStopDatabaseService(server *ServerMonitor) error
func (*Cluster) OpenSVCUnprovision ¶
func (cluster *Cluster) OpenSVCUnprovision()
func (*Cluster) OpenSVCUnprovisionDatabaseService ¶
func (cluster *Cluster) OpenSVCUnprovisionDatabaseService(db *ServerMonitor)
func (*Cluster) OpenSVCUnprovisionProxyService ¶
func (*Cluster) OpenSVCWaitDequeue ¶
func (*Cluster) PrepareBench ¶
func (*Cluster) PrintTopology ¶
func (cluster *Cluster) PrintTopology()
func (*Cluster) RejoinMysqldump ¶
func (cluster *Cluster) RejoinMysqldump(source *ServerMonitor, dest *ServerMonitor) error
func (*Cluster) ReloadConfig ¶
func (*Cluster) ReloadFromSave ¶
func (*Cluster) ResetFailoverCtr ¶
func (cluster *Cluster) ResetFailoverCtr()
func (*Cluster) RestoreConf ¶
func (cluster *Cluster) RestoreConf()
func (*Cluster) RollingUpgrade ¶
func (cluster *Cluster) RollingUpgrade()
func (*Cluster) RunSysbench ¶
func (*Cluster) SetActiveStatus ¶
func (*Cluster) SetBenchMethod ¶
func (*Cluster) SetBinlogServer ¶
func (*Cluster) SetCfgGroupDisplay ¶
func (*Cluster) SetCheckFalsePositiveHeartbeat ¶
func (*Cluster) SetCleanAll ¶
func (*Cluster) SetFailLimit ¶
func (*Cluster) SetFailRestartUnsafe ¶
func (*Cluster) SetFailSync ¶
func (*Cluster) SetFailTime ¶
func (*Cluster) SetFailoverCtr ¶
func (*Cluster) SetFailoverTs ¶
func (*Cluster) SetForceSlaveNoGtid ¶
func (*Cluster) SetInteractive ¶
func (*Cluster) SetLogLevel ¶
func (*Cluster) SetLogStdout ¶
func (cluster *Cluster) SetLogStdout()
func (*Cluster) SetMaintenance ¶
func (*Cluster) SetMasterReadOnly ¶
func (cluster *Cluster) SetMasterReadOnly()
func (*Cluster) SetMasterStateFailed ¶
func (cluster *Cluster) SetMasterStateFailed()
func (*Cluster) SetMultiMaster ¶
func (*Cluster) SetMultiTierSlave ¶
topology setter
func (*Cluster) SetPrefMaster ¶
func (*Cluster) SetReadOnly ¶
func (*Cluster) SetRejoinBackupBinlog ¶
func (*Cluster) SetRejoinDump ¶
func (*Cluster) SetRejoinFlashback ¶
func (*Cluster) SetRejoinSemisync ¶
func (*Cluster) SetRplChecks ¶
func (*Cluster) SetRplMaxDelay ¶
func (*Cluster) SetSlavesReadOnly ¶
func (*Cluster) SetSwitchSync ¶
func (*Cluster) SetTestMode ¶
func (*Cluster) SetTestStartCluster ¶
func (*Cluster) SetTestStopCluster ¶
func (*Cluster) SetTraffic ¶
func (*Cluster) ShutdownDatabase ¶
func (cluster *Cluster) ShutdownDatabase(server *ServerMonitor) error
func (*Cluster) SpiderSetShardsRepl ¶
func (cluster *Cluster) SpiderSetShardsRepl()
func (*Cluster) SpiderShardsDiscovery ¶
func (cluster *Cluster) SpiderShardsDiscovery()
func (*Cluster) StartAllNodes ¶
func (*Cluster) StartDatabaseService ¶
func (cluster *Cluster) StartDatabaseService(server *ServerMonitor) error
func (*Cluster) StartSlaves ¶
func (*Cluster) StopDatabaseService ¶
func (cluster *Cluster) StopDatabaseService(server *ServerMonitor) error
func (*Cluster) StopSlaves ¶
func (*Cluster) SwitchCleanAll ¶
func (cluster *Cluster) SwitchCleanAll()
func (*Cluster) SwitchFailSync ¶
func (cluster *Cluster) SwitchFailSync()
func (*Cluster) SwitchOver ¶
func (cluster *Cluster) SwitchOver()
func (*Cluster) SwitchReadOnly ¶
func (cluster *Cluster) SwitchReadOnly()
func (*Cluster) SwitchRejoin ¶
func (cluster *Cluster) SwitchRejoin()
func (*Cluster) SwitchRejoinBackupBinlog ¶
func (cluster *Cluster) SwitchRejoinBackupBinlog()
func (*Cluster) SwitchRejoinDump ¶
func (cluster *Cluster) SwitchRejoinDump()
func (*Cluster) SwitchRejoinFlashback ¶
func (cluster *Cluster) SwitchRejoinFlashback()
func (*Cluster) SwitchRejoinSemisync ¶
func (cluster *Cluster) SwitchRejoinSemisync()
func (*Cluster) SwitchRplChecks ¶
func (cluster *Cluster) SwitchRplChecks()
func (*Cluster) SwitchSwitchoverSync ¶
func (cluster *Cluster) SwitchSwitchoverSync()
func (*Cluster) SwitchVerbosity ¶
func (cluster *Cluster) SwitchVerbosity()
func (*Cluster) SwitchoverWaitTest ¶
func (cluster *Cluster) SwitchoverWaitTest()
func (*Cluster) ToggleInteractive ¶
func (cluster *Cluster) ToggleInteractive()
func (*Cluster) TopologyClusterDown ¶
TopologyClusterDown track state all ckuster down
func (*Cluster) TopologyDiscover ¶
Start of topology detection Create a connection to each host and build list of slaves.
func (*Cluster) Unprovision ¶
func (cluster *Cluster) Unprovision()
func (*Cluster) UnprovisionDatabaseService ¶
func (cluster *Cluster) UnprovisionDatabaseService(server *ServerMonitor) error
func (*Cluster) UnprovisionProxyService ¶
func (*Cluster) WaitBootstrapDiscovery ¶
func (*Cluster) WaitClusterStop ¶
func (*Cluster) WaitDatabaseStart ¶
func (cluster *Cluster) WaitDatabaseStart(server *ServerMonitor) error
func (*Cluster) WaitFailover ¶
func (*Cluster) WaitFailoverEnd ¶
func (*Cluster) WaitFailoverEndState ¶
func (cluster *Cluster) WaitFailoverEndState()
func (*Cluster) WaitMariaDBStop ¶
func (cluster *Cluster) WaitMariaDBStop(server *ServerMonitor) error
func (*Cluster) WaitRejoin ¶
func (*Cluster) WaitSwitchover ¶
type Crash ¶
type Crash struct { URL string FailoverMasterLogFile string FailoverMasterLogPos string FailoverSemiSyncSlaveStatus bool FailoverIOGtid *gtid.List ElectedMasterURL string }
Crash will store informations on a crash based on the replication stream
type Proxy ¶
type Proxy struct { Id string Type string Host string Port string User string Pass string WritePort int ReadPort int ReadWritePort int }
Proxy defines a proxy
type ServerMonitor ¶
type ServerMonitor struct { Id string //Unique name given by cluster & crc64(URL) used by test to provision Conn *sqlx.DB User string Pass string URL string DSN string `json:"-"` Host string Port string IP string GTIDBinlogPos *gtid.List Strict string ServerID uint MasterServerID uint MasterHost string MasterPort string LogBin string UsingGtid string CurrentGtid *gtid.List SlaveGtid *gtid.List IOGtid *gtid.List IOThread string SQLThread string ReadOnly string Delay sql.NullInt64 State string PrevState string IOErrno uint IOError string SQLErrno uint SQLError string FailCount int FailSuspectHeartbeat int64 SemiSyncMasterStatus bool SemiSyncSlaveStatus bool RplMasterStatus bool EventScheduler bool EventStatus []dbhelper.Event ClusterGroup *Cluster MasterLogFile string MasterLogPos string MasterHeartbeatPeriod float64 MasterUseGtid string BinaryLogFile string BinaryLogPos string FailoverMasterLogFile string FailoverMasterLogPos string FailoverSemiSyncSlaveStatus bool FailoverIOGtid *gtid.List Process *os.Process Conf string //Unique Conf given by reg test initMariaDB MxsServerName string //Unique server Name in maxscale conf MxsServerStatus string MxsServerConnections int HaveSemiSync bool HaveInnodbTrxCommit bool HaveSyncBinLog bool HaveChecksum bool HaveBinlogRow bool HaveBinlogAnnotate bool HaveBinlogSlowqueries bool HaveBinlogCompress bool HaveLogSlaveUpdates bool HaveGtidStrictMode bool Version int IsMaxscale bool IsRelay bool IsSlave bool IsMaintenance bool MxsVersion int MxsHaveGtid bool RelayLogSize uint64 Replications []dbhelper.SlaveStatus ReplicationSourceName string DBVersion *dbhelper.MySQLVersion Status map[string]string GTIDExecuted string ReplicationHealth string }
ServerMonitor defines a server to monitor.
func (*ServerMonitor) Close ¶
func (server *ServerMonitor) Close()
func (*ServerMonitor) HasCycling ¶
func (server *ServerMonitor) HasCycling(ServerID uint) bool
func (*ServerMonitor) HasSiblings ¶
func (server *ServerMonitor) HasSiblings(sib []*ServerMonitor) bool
check if node see same master as the passed list
func (*ServerMonitor) HasSlaves ¶
func (server *ServerMonitor) HasSlaves(sib []*ServerMonitor) bool
func (*ServerMonitor) IsDown ¶
func (server *ServerMonitor) IsDown() bool
func (*ServerMonitor) IsIgnored ¶
func (server *ServerMonitor) IsIgnored() bool
func (*ServerMonitor) ReadAllRelayLogs ¶
func (server *ServerMonitor) ReadAllRelayLogs() error
func (*ServerMonitor) Refresh ¶
func (server *ServerMonitor) Refresh() error
Refresh a server object
func (*ServerMonitor) RejoinMaster ¶
func (server *ServerMonitor) RejoinMaster() error
RejoinMaster a server that just show up without slave status
func (*ServerMonitor) RejoinMasterSST ¶
func (server *ServerMonitor) RejoinMasterSST() error
func (*ServerMonitor) UsedGtidAtElection ¶
func (server *ServerMonitor) UsedGtidAtElection(crash *Crash) bool
UseGtid check is replication use gtid