Documentation
¶
Overview ¶
replication-manager - Replication Manager Monitoring and CLI for MariaDB and MySQL Copyright 2017 Signal 18 SARL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <svaroqui@gmail.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 Copyright 2017 Signal 18 SARL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <svaroqui@gmail.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 Copyright 2017 Signal 18 SARL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <svaroqui@gmail.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 Copyright 2017 Signal 18 SARL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <svaroqui@gmail.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 Copyright 2017 Signal 18 SARL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <svaroqui@gmail.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 Copyright 2017 Signal 18 SARL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <svaroqui@gmail.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 Copyright 2017 Signal 18 SARL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <svaroqui@gmail.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 Copyright 2017 Signal 18 SARL Authors: Guillaume Lefranc <guillaume@signal18.io>
Stephane Varoqui <svaroqui@gmail.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 ¶
- Constants
- type Alerts
- type Backend
- type Cluster
- func (cluster *Cluster) AddSeededServer(srv string) error
- func (cluster *Cluster) AllDatabaseCanConn() bool
- func (cluster *Cluster) Bootstrap() error
- func (cluster *Cluster) BootstrapReplication() error
- func (cluster *Cluster) BootstrapReplicationCleanup() 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) CloseRing(oldMaster *ServerMonitor) error
- func (cluster *Cluster) CloseTestCluster(conf string, test *Test) bool
- func (cluster *Cluster) CountFailed(s []*ServerMonitor) int
- func (cluster *Cluster) CreateKey() error
- func (cluster *Cluster) DelayAllSlaves() error
- func (cluster *Cluster) DisableSemisync() error
- func (cluster *Cluster) DisplayHelp()
- func (cluster *Cluster) EnableSemisync() error
- func (cluster *Cluster) FailedMasterDiscovery()
- func (cluster *Cluster) FailoverAndWait()
- func (cluster *Cluster) FailoverForce() error
- func (cluster *Cluster) FailoverNow()
- 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) GetClusterName() string
- 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) GetDatabaseTags() []string
- 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) GetFailedServer() *ServerMonitor
- func (cluster *Cluster) GetFailoverCtr() int
- func (cluster *Cluster) GetFailoverTs() int64
- func (cluster *Cluster) GetGComm() string
- func (cluster *Cluster) GetHaproxyTemplate(collector opensvc.Collector, servers string, agent opensvc.Host, prx *Proxy) (string, error)
- func (cluster *Cluster) GetIndiceServerFromId(Id string) int
- func (cluster *Cluster) GetLocalProxy(this *Proxy) Proxy
- 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) 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) GetPodDockerShardproxyTemplate(collector opensvc.Collector, pod string) string
- func (cluster *Cluster) GetPodDockerSphinxTemplate(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) GetProxiesEnv(collector opensvc.Collector, servers string, agent opensvc.Host, prx *Proxy) string
- func (cluster *Cluster) GetProxyFromName(name string) *Proxy
- func (cluster *Cluster) GetProxyTags() []string
- func (cluster *Cluster) GetProxysqlTemplate(collector opensvc.Collector, servers string, agent opensvc.Host, prx *Proxy) (string, error)
- 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) GetRingChildServer(oldMaster *ServerMonitor) *ServerMonitor
- func (cluster *Cluster) GetRingParentServer(oldMaster *ServerMonitor) *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) GetServerFromURL(url string) *ServerMonitor
- func (cluster *Cluster) GetServers() serverList
- func (cluster *Cluster) GetShardproxyTemplate(collector opensvc.Collector, servers string, agent opensvc.Host, prx *Proxy) (string, error)
- func (cluster *Cluster) GetSlaves() serverList
- func (cluster *Cluster) GetSphinxTemplate(collector opensvc.Collector, servers string, agent opensvc.Host, prx *Proxy) (string, error)
- func (cluster *Cluster) GetStateMachine() *state.StateMachine
- func (cluster *Cluster) GetStatus() bool
- 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, ...) error
- func (cluster *Cluster) InitAgent(conf config.Config)
- func (cluster *Cluster) InitBenchTable() 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) IsActive() bool
- func (cluster *Cluster) IsCurrentGTIDSync(m *ServerMonitor, s *ServerMonitor) bool
- func (cluster *Cluster) IsDiscovered() bool
- func (cluster *Cluster) IsEqualBinlogFilters(m *ServerMonitor, s *ServerMonitor) (bool, error)
- func (cluster *Cluster) IsEqualReplicationFilters(m *ServerMonitor, s *ServerMonitor) bool
- func (cluster *Cluster) IsInFailover() bool
- func (cluster *Cluster) IsInHostList(host string) bool
- func (cluster *Cluster) IsInIgnoredHosts(host string) bool
- func (cluster *Cluster) IsInPreferedHosts(host string) bool
- func (cluster *Cluster) IsMasterFailed() bool
- func (cluster *Cluster) IsProvision() bool
- func (cluster *Cluster) IsProxyEqualMaster() bool
- func (cluster *Cluster) IsVerbose() bool
- func (cluster *Cluster) LocalhostProvisionCluster() error
- func (cluster *Cluster) LocalhostProvisionDatabaseService(server *ServerMonitor) error
- func (cluster *Cluster) LocalhostProvisionDatabases() error
- func (cluster *Cluster) LocalhostProvisionProxies() error
- func (cluster *Cluster) LocalhostProvisionProxyService(prx *Proxy) 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) MdbsproxyCopyTable(oldmaster *ServerMonitor, newmaster *ServerMonitor, proxy *Proxy)
- func (cluster *Cluster) MultipleSlavesUp(candidate *ServerMonitor) bool
- func (cluster *Cluster) OpenSVCConnect() opensvc.Collector
- func (cluster *Cluster) OpenSVCProvisionCluster() error
- func (cluster *Cluster) OpenSVCProvisionDatabaseService(s *ServerMonitor)
- func (cluster *Cluster) OpenSVCProvisionOneSrvPerDB() error
- func (cluster *Cluster) OpenSVCProvisionProxies() error
- func (cluster *Cluster) OpenSVCProvisionProxyService(prx *Proxy) error
- func (cluster *Cluster) OpenSVCProvisionReloadHaproxyConf(Conf string) string
- 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) error
- func (cluster *Cluster) PrepareBench() error
- func (cluster *Cluster) PrintTopology()
- func (cluster *Cluster) ProvisionServices() error
- func (cluster *Cluster) RejoinFixRelay(slave *ServerMonitor, relay *ServerMonitor) error
- 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) SendProxyStats(proxy *Proxy) error
- func (cluster *Cluster) SetActiveStatus(status string)
- func (cluster *Cluster) SetBenchMethod(m string)
- func (cluster *Cluster) SetBinlogServer(binlogserver bool)
- func (cluster *Cluster) SetCertificate(svc opensvc.Collector)
- func (cluster *Cluster) SetCfgGroupDisplay(cfgGroup string)
- func (cluster *Cluster) SetCheckFalsePositiveHeartbeat(CheckFalsePositiveHeartbeat bool)
- func (cluster *Cluster) SetCleanAll(check bool)
- func (cluster *Cluster) SetClusterList(clusters map[string]*Cluster)
- 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) SetMasterReadOnly()
- func (cluster *Cluster) SetMasterStateFailed()
- func (cluster *Cluster) SetMultiMaster(multimaster bool)
- func (cluster *Cluster) SetMultiMasterRing(multimasterring bool)
- func (cluster *Cluster) SetMultiMasterWsrep(wsrep bool)
- func (cluster *Cluster) SetMultiTierSlave(multitierslave bool)
- func (cluster *Cluster) SetPrefMaster(PrefMaster string)
- func (cluster *Cluster) SetProxyServerMaintenance(serverid uint)
- 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) SetState(key string, s state.State)
- 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) StartDatabaseWaitRejoin(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) SwitchPseudoGTID()
- 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) SwitchServerMaintenance(serverid uint)
- 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) VMasterFailover(fail bool) bool
- 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) WaitProxyEqualMaster() error
- func (cluster *Cluster) WaitRejoin(wg *sync.WaitGroup)
- func (cluster *Cluster) WaitSwitchover(wg *sync.WaitGroup)
- type Crash
- type Endpoint
- type Proxy
- type SSHTunnel
- type ServerMonitor
- func (server *ServerMonitor) CheckMasterSettings()
- func (server *ServerMonitor) CheckPrivileges()
- func (server *ServerMonitor) CheckReplication() string
- func (server *ServerMonitor) CheckSlaveSameMasterGrants() bool
- func (server *ServerMonitor) CheckSlaveSettings()
- func (server *ServerMonitor) Close()
- func (server *ServerMonitor) FlushTables() error
- func (server *ServerMonitor) GenerateDBTemplate(collector opensvc.Collector, servers []string, ports []string, ...) (string, error)
- func (server *ServerMonitor) GetBinlogPosAfterSkipNumberOfEvents(file string, pos string, skip int) (string, string, error)
- func (server *ServerMonitor) GetBinlogPosFromPseudoGTID(GTID string) (string, string, error)
- func (server *ServerMonitor) GetLastPseudoGTID() (string, error)
- func (server *ServerMonitor) GetNumberOfEventsAfterPos(file string, pos string) (int, error)
- func (server *ServerMonitor) GetPodDockerDBTemplate(collector opensvc.Collector, pod string, i int) string
- func (server *ServerMonitor) GetReplicationDelay() int64
- func (server *ServerMonitor) GetReplicationHearbeatPeriod() float64
- func (server *ServerMonitor) GetReplicationMasterHost() string
- func (server *ServerMonitor) GetReplicationMasterPort() string
- func (server *ServerMonitor) GetReplicationServerID() uint
- func (server *ServerMonitor) GetReplicationUsingGtid() string
- func (server *ServerMonitor) GetSchemas() ([]string, error)
- func (server *ServerMonitor) GetSibling() *ServerMonitor
- func (server *ServerMonitor) GetSlaveStatus(name string) (*dbhelper.SlaveStatus, error)
- func (server *ServerMonitor) GetSlaveStatusLastSeen(name string) (*dbhelper.SlaveStatus, error)
- func (server *ServerMonitor) GetSnapshot() string
- func (server *ServerMonitor) GetTableFromDict(URI string) dbhelper.Table
- func (server *ServerMonitor) HasCycling() bool
- func (server *ServerMonitor) HasGTIDReplication() bool
- func (server *ServerMonitor) HasReplicationIssue() bool
- func (server *ServerMonitor) HasSiblings(sib []*ServerMonitor) bool
- func (server *ServerMonitor) HasSlaves(sib []*ServerMonitor) bool
- func (server *ServerMonitor) HasSuperReadOnly() bool
- func (server *ServerMonitor) IsAcid() bool
- func (server *ServerMonitor) IsDown() bool
- func (server *ServerMonitor) IsIOThreadRunning() bool
- func (server *ServerMonitor) IsIgnored() bool
- func (server *ServerMonitor) IsMariaDB() bool
- func (server *ServerMonitor) IsMaster() bool
- func (server *ServerMonitor) IsMySQL() bool
- func (server *ServerMonitor) IsPrefered() bool
- func (server *ServerMonitor) IsReadOnly() bool
- func (server *ServerMonitor) IsReadWrite() bool
- func (server *ServerMonitor) IsReplicationBroken() bool
- func (server *ServerMonitor) IsSQLThreadRunning() bool
- func (server *ServerMonitor) Ping(wg *sync.WaitGroup)
- func (server *ServerMonitor) Provision()
- func (server *ServerMonitor) ReadAllRelayLogs() error
- func (server *ServerMonitor) Refresh() error
- func (server *ServerMonitor) RejoinLoop() error
- func (server *ServerMonitor) RejoinMaster() error
- func (server *ServerMonitor) RejoinMasterSST() error
- func (server *ServerMonitor) ResetSlave() error
- func (server *ServerMonitor) SendAlert() error
- func (server *ServerMonitor) SendDatabaseStats(slaveStatus *dbhelper.SlaveStatus) error
- func (server *ServerMonitor) SetIgnored(ignored bool)
- func (server *ServerMonitor) SetMaintenance()
- func (server *ServerMonitor) SetPrefered(pref bool)
- func (server *ServerMonitor) SetReadOnly() error
- func (server *ServerMonitor) SetReadWrite() error
- func (server *ServerMonitor) SetReplicationChannel(source string) error
- func (server *ServerMonitor) SetReplicationFromMaxsaleServer(master *ServerMonitor) error
- func (server *ServerMonitor) SetReplicationGTIDCurrentPosFromServer(master *ServerMonitor) error
- func (server *ServerMonitor) SetReplicationGTIDSlavePosFromServer(master *ServerMonitor) error
- func (server *ServerMonitor) StartSlave() error
- func (server *ServerMonitor) StopSlave() error
- func (server *ServerMonitor) StopSlaveIOThread() error
- func (server *ServerMonitor) StopSlaveSQLThread() error
- func (server *ServerMonitor) SwitchMaintenance() error
- func (server *ServerMonitor) Uprovision()
- func (server *ServerMonitor) UsedGtidAtElection(crash *Crash) bool
- type Test
Constants ¶
const ( LvlInfo = "INFO" LvlWarn = "WARN" LvlErr = "ERROR" LvlDbg = "DEBUG" )
Log levels
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
CleanAll bool
HaveWriteDuringCatchBinlog bool
// contains filtered or unexported fields
}
func (*Cluster) AddSeededServer ¶
func (*Cluster) AllDatabaseCanConn ¶
func (*Cluster) BootstrapReplication ¶
func (*Cluster) BootstrapReplicationCleanup ¶
func (*Cluster) CheckFailed ¶
func (cluster *Cluster) CheckFailed()
func (*Cluster) CheckSlavesRunning ¶
func (*Cluster) CheckTableConsistency ¶
func (*Cluster) ChecksumBench ¶
func (*Cluster) CleanupBench ¶
func (*Cluster) CloseRing ¶
func (cluster *Cluster) CloseRing(oldMaster *ServerMonitor) error
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) FailedMasterDiscovery ¶
func (cluster *Cluster) FailedMasterDiscovery()
func (*Cluster) FailoverAndWait ¶
func (cluster *Cluster) FailoverAndWait()
func (*Cluster) FailoverForce ¶
func (*Cluster) FailoverNow ¶
func (cluster *Cluster) FailoverNow()
func (*Cluster) ForgetTopology ¶
func (*Cluster) FoundDatabaseAgent ¶
func (cluster *Cluster) FoundDatabaseAgent(server *ServerMonitor) (opensvc.Host, error)
func (*Cluster) FoundProxyAgent ¶
func (*Cluster) GetClusterName ¶
func (*Cluster) GetClusterProxyConn ¶
func (*Cluster) GetClusterThisProxyConn ¶
func (*Cluster) GetCrashes ¶
func (cluster *Cluster) GetCrashes() crashList
GetCrashes return crashes
func (*Cluster) GetDatabaseTags ¶
func (*Cluster) GetDockerDiskTemplate ¶
func (*Cluster) GetFailSync ¶
func (*Cluster) GetFailedServer ¶
func (cluster *Cluster) GetFailedServer() *ServerMonitor
func (*Cluster) GetFailoverCtr ¶
func (*Cluster) GetFailoverTs ¶
func (*Cluster) GetHaproxyTemplate ¶
func (*Cluster) GetIndiceServerFromId ¶
func (*Cluster) GetLocalProxy ¶
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) GetPodDockerHaproxyTemplate ¶
func (*Cluster) GetPodDockerMaxscaleTemplate ¶
func (*Cluster) GetPodDockerProxysqlTemplate ¶
func (*Cluster) GetPodDockerShardproxyTemplate ¶
func (*Cluster) GetPodDockerSphinxTemplate ¶
func (*Cluster) GetPodNetTemplate ¶
func (*Cluster) GetPodPackageTemplate ¶
func (*Cluster) GetProxies ¶
func (cluster *Cluster) GetProxies() proxyList
func (*Cluster) GetProxiesEnv ¶
func (*Cluster) GetProxyFromName ¶
func (*Cluster) GetProxyTags ¶
func (*Cluster) GetProxysqlTemplate ¶
func (*Cluster) GetRejoinBackupBinlog ¶
func (*Cluster) GetRejoinDump ¶
func (*Cluster) GetRejoinFlashback ¶
func (*Cluster) GetRejoinSemisync ¶
func (*Cluster) GetRelayServer ¶
func (cluster *Cluster) GetRelayServer() *ServerMonitor
func (*Cluster) GetRingChildServer ¶
func (cluster *Cluster) GetRingChildServer(oldMaster *ServerMonitor) *ServerMonitor
func (*Cluster) GetRingParentServer ¶
func (cluster *Cluster) GetRingParentServer(oldMaster *ServerMonitor) *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) GetServerFromURL ¶
func (cluster *Cluster) GetServerFromURL(url string) *ServerMonitor
func (*Cluster) GetServers ¶
func (cluster *Cluster) GetServers() serverList
func (*Cluster) GetShardproxyTemplate ¶
func (*Cluster) GetSphinxTemplate ¶
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, httplog *httplog.HttpLog, termlength int, runUUID string, repmgrVersion string, repmgrHostname string, key []byte) error
Init initial cluster definition
func (*Cluster) InitBenchTable ¶
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) IsCurrentGTIDSync ¶
func (cluster *Cluster) IsCurrentGTIDSync(m *ServerMonitor, s *ServerMonitor) bool
func (*Cluster) IsDiscovered ¶
func (*Cluster) IsEqualBinlogFilters ¶
func (cluster *Cluster) IsEqualBinlogFilters(m *ServerMonitor, s *ServerMonitor) (bool, error)
func (*Cluster) IsEqualReplicationFilters ¶
func (cluster *Cluster) IsEqualReplicationFilters(m *ServerMonitor, s *ServerMonitor) bool
func (*Cluster) IsInFailover ¶
func (*Cluster) IsInHostList ¶
func (*Cluster) IsInIgnoredHosts ¶
func (*Cluster) IsInPreferedHosts ¶
func (*Cluster) IsMasterFailed ¶
func (*Cluster) IsProvision ¶
func (*Cluster) IsProxyEqualMaster ¶
func (*Cluster) LocalhostProvisionCluster ¶
func (*Cluster) LocalhostProvisionDatabaseService ¶
func (cluster *Cluster) LocalhostProvisionDatabaseService(server *ServerMonitor) error
func (*Cluster) LocalhostProvisionDatabases ¶
func (*Cluster) LocalhostProvisionProxies ¶
func (*Cluster) LocalhostProvisionProxyService ¶
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) MdbsproxyCopyTable ¶
func (cluster *Cluster) MdbsproxyCopyTable(oldmaster *ServerMonitor, newmaster *ServerMonitor, proxy *Proxy)
func (*Cluster) MultipleSlavesUp ¶
func (cluster *Cluster) MultipleSlavesUp(candidate *ServerMonitor) bool
func (*Cluster) OpenSVCConnect ¶
func (*Cluster) OpenSVCProvisionCluster ¶
func (*Cluster) OpenSVCProvisionDatabaseService ¶
func (cluster *Cluster) OpenSVCProvisionDatabaseService(s *ServerMonitor)
func (*Cluster) OpenSVCProvisionOneSrvPerDB ¶
func (*Cluster) OpenSVCProvisionProxies ¶
func (*Cluster) OpenSVCProvisionProxyService ¶
func (*Cluster) OpenSVCProvisionReloadHaproxyConf ¶
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) ProvisionServices ¶
func (*Cluster) RejoinFixRelay ¶
func (cluster *Cluster) RejoinFixRelay(slave *ServerMonitor, relay *ServerMonitor) error
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) SendProxyStats ¶
func (*Cluster) SetActiveStatus ¶
func (*Cluster) SetBenchMethod ¶
func (*Cluster) SetBinlogServer ¶
func (*Cluster) SetCertificate ¶
func (*Cluster) SetCfgGroupDisplay ¶
func (*Cluster) SetCheckFalsePositiveHeartbeat ¶
func (*Cluster) SetCleanAll ¶
func (*Cluster) SetClusterList ¶
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) SetMasterReadOnly ¶
func (cluster *Cluster) SetMasterReadOnly()
func (*Cluster) SetMasterStateFailed ¶
func (cluster *Cluster) SetMasterStateFailed()
func (*Cluster) SetMultiMaster ¶
func (*Cluster) SetMultiMasterRing ¶
func (*Cluster) SetMultiMasterWsrep ¶
func (*Cluster) SetMultiTierSlave ¶
topology setter
func (*Cluster) SetPrefMaster ¶
func (*Cluster) SetProxyServerMaintenance ¶
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) StartDatabaseWaitRejoin ¶
func (cluster *Cluster) StartDatabaseWaitRejoin(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) SwitchPseudoGTID ¶
func (cluster *Cluster) SwitchPseudoGTID()
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) SwitchServerMaintenance ¶
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) VMasterFailover ¶
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) WaitProxyEqualMaster ¶
func (*Cluster) WaitRejoin ¶
func (*Cluster) WaitSwitchover ¶
type Crash ¶
type Crash struct {
URL string
FailoverMasterLogFile string
FailoverMasterLogPos string
NewMasterLogFile string
NewMasterLogPos 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
TunnelPort int
TunnelWritePort int
Tunnel bool
User string
Pass string
WritePort int
ReadPort int
ReadWritePort int
ReaderHostgroup int
WriterHostgroup int
BackendsWrite []Backend
BackendsRead []Backend
Version string
}
Proxy defines a proxy
type SSHTunnel ¶
type SSHTunnel struct {
Local *Endpoint
Server *Endpoint
Remote *Endpoint
Config *ssh.ClientConfig
}
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 `json:"-"`
URL string
DSN string `json:"-"`
Host string
Port string
IP string
Strict string
ServerID uint
LogBin string
GTIDBinlogPos *gtid.List
CurrentGtid *gtid.List
SlaveGtid *gtid.List
IOGtid *gtid.List
FailoverIOGtid *gtid.List
GTIDExecuted string
ReadOnly string
State string
PrevState string
FailCount int
FailSuspectHeartbeat int64
SemiSyncMasterStatus bool
SemiSyncSlaveStatus bool
RplMasterStatus bool
EventScheduler bool
EventStatus []dbhelper.Event
ClusterGroup *Cluster
BinaryLogFile string
BinaryLogPos string
FailoverMasterLogFile string
FailoverMasterLogPos string
FailoverSemiSyncSlaveStatus bool
Process *os.Process
MxsServerName string //Unique server Name in maxscale conf
MxsServerStatus string
ProxysqlHostgroup string
HaveSemiSync bool
HaveInnodbTrxCommit bool
HaveSyncBinLog bool
HaveChecksum bool
HaveBinlogRow bool
HaveBinlogAnnotate bool
HaveBinlogSlowqueries bool
HaveBinlogCompress bool
HaveLogSlaveUpdates bool
HaveGtidStrictMode bool
HaveMySQLGTID bool
HaveMariaDBGTID bool
HaveWsrep bool
HaveReadOnly bool
Version int
IsWsrepSync bool
IsWsrepDonor bool
IsMaxscale bool
IsRelay bool
IsSlave bool
IsVirtualMaster bool
IsMaintenance bool
Ignored bool
Prefered bool
BinlogDumpThreads int
MxsVersion int
MxsHaveGtid bool
RelayLogSize uint64
Replications []dbhelper.SlaveStatus
LastSeenReplications []dbhelper.SlaveStatus
MasterStatus dbhelper.MasterStatus
ReplicationSourceName string
DBVersion *dbhelper.MySQLVersion
Status map[string]string
Variables map[string]string
EngineInnoDB map[string]string
Queries map[string]string
ReplicationHealth string
TestConfig string
DictTables map[string]dbhelper.Table
Users map[string]dbhelper.Grant `json:"-"`
// contains filtered or unexported fields
}
ServerMonitor defines a server to monitor.
func (*ServerMonitor) CheckMasterSettings ¶
func (server *ServerMonitor) CheckMasterSettings()
CheckMasterSettings check master variables & enforce if set
func (*ServerMonitor) CheckPrivileges ¶
func (server *ServerMonitor) CheckPrivileges()
CheckPriviledges replication manager user privileges on live servers
func (*ServerMonitor) CheckReplication ¶
func (server *ServerMonitor) CheckReplication() string
CheckReplication Check replication health and return status string
func (*ServerMonitor) CheckSlaveSameMasterGrants ¶
func (server *ServerMonitor) CheckSlaveSameMasterGrants() bool
CheckSlaveSameMasterGrants check same serers grants as the master
func (*ServerMonitor) CheckSlaveSettings ¶
func (server *ServerMonitor) CheckSlaveSettings()
CheckSlaveSettings check slave variables & enforce if set
func (*ServerMonitor) Close ¶
func (server *ServerMonitor) Close()
func (*ServerMonitor) FlushTables ¶
func (server *ServerMonitor) FlushTables() error
func (*ServerMonitor) GenerateDBTemplate ¶
func (*ServerMonitor) GetBinlogPosAfterSkipNumberOfEvents ¶
func (*ServerMonitor) GetBinlogPosFromPseudoGTID ¶
func (server *ServerMonitor) GetBinlogPosFromPseudoGTID(GTID string) (string, string, error)
func (*ServerMonitor) GetLastPseudoGTID ¶
func (server *ServerMonitor) GetLastPseudoGTID() (string, error)
func (*ServerMonitor) GetNumberOfEventsAfterPos ¶
func (server *ServerMonitor) GetNumberOfEventsAfterPos(file string, pos string) (int, error)
func (*ServerMonitor) GetPodDockerDBTemplate ¶
func (*ServerMonitor) GetReplicationDelay ¶
func (server *ServerMonitor) GetReplicationDelay() int64
func (*ServerMonitor) GetReplicationHearbeatPeriod ¶
func (server *ServerMonitor) GetReplicationHearbeatPeriod() float64
func (*ServerMonitor) GetReplicationMasterHost ¶
func (server *ServerMonitor) GetReplicationMasterHost() string
func (*ServerMonitor) GetReplicationMasterPort ¶
func (server *ServerMonitor) GetReplicationMasterPort() string
func (*ServerMonitor) GetReplicationServerID ¶
func (server *ServerMonitor) GetReplicationServerID() uint
func (*ServerMonitor) GetReplicationUsingGtid ¶
func (server *ServerMonitor) GetReplicationUsingGtid() string
func (*ServerMonitor) GetSchemas ¶
func (server *ServerMonitor) GetSchemas() ([]string, error)
func (*ServerMonitor) GetSibling ¶
func (server *ServerMonitor) GetSibling() *ServerMonitor
func (*ServerMonitor) GetSlaveStatus ¶
func (server *ServerMonitor) GetSlaveStatus(name string) (*dbhelper.SlaveStatus, error)
func (*ServerMonitor) GetSlaveStatusLastSeen ¶
func (server *ServerMonitor) GetSlaveStatusLastSeen(name string) (*dbhelper.SlaveStatus, error)
func (*ServerMonitor) GetSnapshot ¶
func (server *ServerMonitor) GetSnapshot() string
func (*ServerMonitor) GetTableFromDict ¶
func (server *ServerMonitor) GetTableFromDict(URI string) dbhelper.Table
func (*ServerMonitor) HasCycling ¶
func (server *ServerMonitor) HasCycling() bool
func (*ServerMonitor) HasGTIDReplication ¶
func (server *ServerMonitor) HasGTIDReplication() bool
func (*ServerMonitor) HasReplicationIssue ¶
func (server *ServerMonitor) HasReplicationIssue() 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) HasSuperReadOnly ¶
func (server *ServerMonitor) HasSuperReadOnly() bool
func (*ServerMonitor) IsAcid ¶
func (server *ServerMonitor) IsAcid() bool
Check Consistency parameters on server
func (*ServerMonitor) IsDown ¶
func (server *ServerMonitor) IsDown() bool
IsDown() returns true is the server is Failed or Suspect
func (*ServerMonitor) IsIOThreadRunning ¶
func (server *ServerMonitor) IsIOThreadRunning() bool
func (*ServerMonitor) IsIgnored ¶
func (server *ServerMonitor) IsIgnored() bool
func (*ServerMonitor) IsMariaDB ¶
func (server *ServerMonitor) IsMariaDB() bool
func (*ServerMonitor) IsMaster ¶
func (server *ServerMonitor) IsMaster() bool
func (*ServerMonitor) IsMySQL ¶
func (server *ServerMonitor) IsMySQL() bool
func (*ServerMonitor) IsPrefered ¶
func (server *ServerMonitor) IsPrefered() bool
func (*ServerMonitor) IsReadOnly ¶
func (server *ServerMonitor) IsReadOnly() bool
func (*ServerMonitor) IsReadWrite ¶
func (server *ServerMonitor) IsReadWrite() bool
func (*ServerMonitor) IsReplicationBroken ¶
func (server *ServerMonitor) IsReplicationBroken() bool
func (*ServerMonitor) IsSQLThreadRunning ¶
func (server *ServerMonitor) IsSQLThreadRunning() bool
func (*ServerMonitor) Ping ¶
func (server *ServerMonitor) Ping(wg *sync.WaitGroup)
func (*ServerMonitor) Provision ¶
func (server *ServerMonitor) Provision()
func (*ServerMonitor) ReadAllRelayLogs ¶
func (server *ServerMonitor) ReadAllRelayLogs() error
func (*ServerMonitor) Refresh ¶
func (server *ServerMonitor) Refresh() error
Refresh a server object
func (*ServerMonitor) RejoinLoop ¶
func (server *ServerMonitor) RejoinLoop() error
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) ResetSlave ¶
func (server *ServerMonitor) ResetSlave() error
func (*ServerMonitor) SendAlert ¶
func (server *ServerMonitor) SendAlert() error
func (*ServerMonitor) SendDatabaseStats ¶
func (server *ServerMonitor) SendDatabaseStats(slaveStatus *dbhelper.SlaveStatus) error
func (*ServerMonitor) SetIgnored ¶
func (server *ServerMonitor) SetIgnored(ignored bool)
func (*ServerMonitor) SetMaintenance ¶
func (server *ServerMonitor) SetMaintenance()
func (*ServerMonitor) SetPrefered ¶
func (server *ServerMonitor) SetPrefered(pref bool)
func (*ServerMonitor) SetReadOnly ¶
func (server *ServerMonitor) SetReadOnly() error
func (*ServerMonitor) SetReadWrite ¶
func (server *ServerMonitor) SetReadWrite() error
func (*ServerMonitor) SetReplicationChannel ¶
func (server *ServerMonitor) SetReplicationChannel(source string) error
func (*ServerMonitor) SetReplicationFromMaxsaleServer ¶
func (server *ServerMonitor) SetReplicationFromMaxsaleServer(master *ServerMonitor) error
func (*ServerMonitor) SetReplicationGTIDCurrentPosFromServer ¶
func (server *ServerMonitor) SetReplicationGTIDCurrentPosFromServer(master *ServerMonitor) error
func (*ServerMonitor) SetReplicationGTIDSlavePosFromServer ¶
func (server *ServerMonitor) SetReplicationGTIDSlavePosFromServer(master *ServerMonitor) error
func (*ServerMonitor) StartSlave ¶
func (server *ServerMonitor) StartSlave() error
func (*ServerMonitor) StopSlave ¶
func (server *ServerMonitor) StopSlave() error
func (*ServerMonitor) StopSlaveIOThread ¶
func (server *ServerMonitor) StopSlaveIOThread() error
func (*ServerMonitor) StopSlaveSQLThread ¶
func (server *ServerMonitor) StopSlaveSQLThread() error
func (*ServerMonitor) SwitchMaintenance ¶
func (server *ServerMonitor) SwitchMaintenance() error
func (*ServerMonitor) Uprovision ¶
func (server *ServerMonitor) Uprovision()
func (*ServerMonitor) UsedGtidAtElection ¶
func (server *ServerMonitor) UsedGtidAtElection(crash *Crash) bool
UseGtid check is replication use gtid
Source Files
¶
- cluster.go
- cluster_chk.go
- cluster_get.go
- cluster_has.go
- cluster_key.go
- cluster_set.go
- cluster_tgl.go
- cluster_tst.go
- crash.go
- display.go
- error.go
- failover.go
- prov.go
- prov_localhost.go
- prov_opensvc.go
- prov_opensvc_db.go
- prov_opensvc_haproxy.go
- prov_opensvc_maxscale.go
- prov_opensvc_proxysql.go
- prov_opensvc_prx.go
- prov_opensvc_shardproxy.go
- prov_opensvc_sphinx.go
- prx.go
- prx_consul.go
- prx_haproxy.go
- prx_maxscale.go
- prx_mdbsproxy.go
- prx_proxysql.go
- prx_sphinx.go
- spider.go
- srv.go
- srv_chk.go
- srv_get.go
- srv_has.go
- srv_rejoin.go
- srv_set.go
- srv_snd.go
- srv_tgl.go
- statefile.go
- topology.go
- tunnel.go