cluster

package
v0.0.0-...-1dcae54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2017 License: GPL-3.0 Imports: 39 Imported by: 0

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

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 *Cluster) AddSeededServer(srv string) error

func (*Cluster) Bootstrap

func (cluster *Cluster) Bootstrap() error

Bootstrap provisions && setup topology

func (*Cluster) BootstrapReplication

func (cluster *Cluster) BootstrapReplication() error

func (*Cluster) BootstrapReplicationCleanup

func (cluster *Cluster) BootstrapReplicationCleanup() error

func (*Cluster) BootstrapServices

func (cluster *Cluster) BootstrapServices() error

func (*Cluster) CheckFailed

func (cluster *Cluster) CheckFailed()

func (*Cluster) CheckSlavesRunning

func (cluster *Cluster) CheckSlavesRunning() bool

func (*Cluster) CheckTableConsistency

func (cluster *Cluster) CheckTableConsistency(table string) bool

func (*Cluster) ChecksumBench

func (cluster *Cluster) ChecksumBench() bool

func (*Cluster) CleanupBench

func (cluster *Cluster) CleanupBench() error

func (*Cluster) Close

func (cluster *Cluster) Close()

func (*Cluster) CloseTestCluster

func (cluster *Cluster) CloseTestCluster(conf string, test *Test) bool

func (*Cluster) CountFailed

func (cluster *Cluster) CountFailed(s []*ServerMonitor) int

CountFailed Count number of failed node

func (*Cluster) DelayAllSlaves

func (cluster *Cluster) DelayAllSlaves() error

func (*Cluster) DisableSemisync

func (cluster *Cluster) DisableSemisync() error

func (*Cluster) DisplayHelp

func (cluster *Cluster) DisplayHelp()

func (*Cluster) EnableSemisync

func (cluster *Cluster) EnableSemisync() error

func (*Cluster) FailoverAndWait

func (cluster *Cluster) FailoverAndWait()

func (*Cluster) FailoverForce

func (cluster *Cluster) FailoverForce() error

func (*Cluster) ForgetTopology

func (cluster *Cluster) ForgetTopology() error

func (*Cluster) FoundDatabaseAgent

func (cluster *Cluster) FoundDatabaseAgent(server *ServerMonitor) (opensvc.Host, error)

func (*Cluster) FoundProxyAgent

func (cluster *Cluster) FoundProxyAgent(proxy *Proxy) (opensvc.Host, error)

func (*Cluster) GenerateDBTemplate

func (cluster *Cluster) GenerateDBTemplate(collector opensvc.Collector, servers []string, ports []string, agents []opensvc.Host, name string, agent string) (string, error)

func (*Cluster) GetClusterProxyConn

func (cluster *Cluster) GetClusterProxyConn() (*sqlx.DB, error)

func (*Cluster) GetClusterThisProxyConn

func (cluster *Cluster) GetClusterThisProxyConn(prx *Proxy) (*sqlx.DB, error)

func (*Cluster) GetConf

func (cluster *Cluster) GetConf() config.Config

func (*Cluster) GetCrashes

func (cluster *Cluster) GetCrashes() crashList

GetCrashes return crashes

func (*Cluster) GetDbPass

func (cluster *Cluster) GetDbPass() string

func (*Cluster) GetDbUser

func (cluster *Cluster) GetDbUser() string

func (*Cluster) GetDockerDiskTemplate

func (cluster *Cluster) GetDockerDiskTemplate(collector opensvc.Collector) string

func (*Cluster) GetFailSync

func (cluster *Cluster) GetFailSync() bool

func (*Cluster) GetFailoverCtr

func (cluster *Cluster) GetFailoverCtr() int

func (*Cluster) GetFailoverTs

func (cluster *Cluster) GetFailoverTs() int64

func (*Cluster) GetHaproxyTemplate

func (cluster *Cluster) GetHaproxyTemplate(collector opensvc.Collector, servers string, agent opensvc.Host, prx *Proxy) (string, error)

func (*Cluster) GetLogLevel

func (cluster *Cluster) GetLogLevel() int

func (*Cluster) GetMaster

func (cluster *Cluster) GetMaster() *ServerMonitor

func (*Cluster) GetMasterFailCount

func (cluster *Cluster) GetMasterFailCount() int

func (*Cluster) GetMasterFromReplication

func (cluster *Cluster) GetMasterFromReplication(s *ServerMonitor) (*ServerMonitor, error)

func (*Cluster) GetMaxFail

func (cluster *Cluster) GetMaxFail() int

func (*Cluster) GetMaxscaleTemplate

func (cluster *Cluster) GetMaxscaleTemplate(collector opensvc.Collector, servers string, agent opensvc.Host, prx *Proxy) (string, error)

func (*Cluster) GetName

func (cluster *Cluster) GetName() string

func (*Cluster) GetOpenSVCSeviceStatus

func (cluster *Cluster) GetOpenSVCSeviceStatus() (int, error)

OpenSVCSeviceStatus 0 not provision , 1 prov and up ,2 on error error

func (*Cluster) GetPodDiskTemplate

func (cluster *Cluster) GetPodDiskTemplate(collector opensvc.Collector, pod string) string

func (*Cluster) GetPodDockerDBTemplate

func (cluster *Cluster) GetPodDockerDBTemplate(collector opensvc.Collector, pod string) string

func (*Cluster) GetPodDockerHaproxyTemplate

func (cluster *Cluster) GetPodDockerHaproxyTemplate(collector opensvc.Collector, pod string) string

func (*Cluster) GetPodDockerMaxscaleTemplate

func (cluster *Cluster) GetPodDockerMaxscaleTemplate(collector opensvc.Collector, pod string) string

func (*Cluster) GetPodDockerProxysqlTemplate

func (cluster *Cluster) GetPodDockerProxysqlTemplate(collector opensvc.Collector, pod string) string

func (*Cluster) GetPodNetTemplate

func (cluster *Cluster) GetPodNetTemplate(collector opensvc.Collector, pod string, i int) string

func (*Cluster) GetPodPackageTemplate

func (cluster *Cluster) GetPodPackageTemplate(collector opensvc.Collector, pod string) string

func (*Cluster) GetProxies

func (cluster *Cluster) GetProxies() proxyList

func (*Cluster) GetProxyFromName

func (cluster *Cluster) GetProxyFromName(name string) *Proxy

func (*Cluster) GetRejoin

func (cluster *Cluster) GetRejoin() bool

func (*Cluster) GetRejoinBackupBinlog

func (cluster *Cluster) GetRejoinBackupBinlog() bool

func (*Cluster) GetRejoinDump

func (cluster *Cluster) GetRejoinDump() bool

func (*Cluster) GetRejoinFlashback

func (cluster *Cluster) GetRejoinFlashback() bool

func (*Cluster) GetRejoinSemisync

func (cluster *Cluster) GetRejoinSemisync() bool

func (*Cluster) GetRelayServer

func (cluster *Cluster) GetRelayServer() *ServerMonitor

func (*Cluster) GetRplChecks

func (cluster *Cluster) GetRplChecks() bool

func (*Cluster) GetRunStatus

func (cluster *Cluster) GetRunStatus() string

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) GetSlaves

func (cluster *Cluster) GetSlaves() serverList

func (*Cluster) GetStateMachine

func (cluster *Cluster) GetStateMachine() *state.StateMachine

func (*Cluster) GetSwitchSync

func (cluster *Cluster) GetSwitchSync() bool

func (*Cluster) GetTestMode

func (cluster *Cluster) GetTestMode() bool

func (*Cluster) GetTopology

func (cluster *Cluster) GetTopology() string

func (*Cluster) GetTraffic

func (cluster *Cluster) GetTraffic() bool

func (*Cluster) GetWaitTrx

func (cluster *Cluster) GetWaitTrx() int64

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) InitAgent

func (cluster *Cluster) InitAgent(conf config.Config) (*sqlx.DB, error)

func (*Cluster) InitBenchTable

func (cluster *Cluster) InitBenchTable() error

func (*Cluster) InitClusterSemiSync

func (cluster *Cluster) InitClusterSemiSync() error

func (*Cluster) InitDatabaseService

func (cluster *Cluster) InitDatabaseService(server *ServerMonitor) error

func (*Cluster) InitProxyService

func (cluster *Cluster) InitProxyService(prx *Proxy) error

func (*Cluster) InitTestCluster

func (cluster *Cluster) InitTestCluster(conf string, test *Test) bool

func (*Cluster) InjectTraffic

func (cluster *Cluster) InjectTraffic()

func (*Cluster) IsMasterFailed

func (cluster *Cluster) IsMasterFailed() bool

func (*Cluster) LocalhostProvisionDatabaseService

func (cluster *Cluster) LocalhostProvisionDatabaseService(server *ServerMonitor) error

func (*Cluster) LocalhostProvisionDatabases

func (cluster *Cluster) LocalhostProvisionDatabases() error

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 *Cluster) LocalhostUnprovision() error

func (*Cluster) LocalhostUnprovisionDatabaseService

func (cluster *Cluster) LocalhostUnprovisionDatabaseService(server *ServerMonitor) error

func (*Cluster) LogPrint

func (cluster *Cluster) LogPrint(msg ...interface{})

func (*Cluster) LogPrintf

func (cluster *Cluster) LogPrintf(level string, format string, args ...interface{})

func (*Cluster) LostMajority

func (cluster *Cluster) LostMajority() bool

LostMajority should be call in case of splitbrain to set maintenance mode

func (*Cluster) MasterFailover

func (cluster *Cluster) MasterFailover(fail bool) bool

MasterFailover triggers a master switchover and returns the new master URL

func (*Cluster) OpenSVCConnect

func (cluster *Cluster) OpenSVCConnect() opensvc.Collector

func (*Cluster) OpenSVCProvisionCluster

func (cluster *Cluster) OpenSVCProvisionCluster() error

func (*Cluster) OpenSVCProvisionDatabaseService

func (cluster *Cluster) OpenSVCProvisionDatabaseService(s *ServerMonitor) error

func (*Cluster) OpenSVCProvisionOneSrv

func (cluster *Cluster) OpenSVCProvisionOneSrv() error

func (*Cluster) OpenSVCProvisionOneSrvPerDB

func (cluster *Cluster) OpenSVCProvisionOneSrvPerDB() error

func (*Cluster) OpenSVCProvisionProxies

func (cluster *Cluster) OpenSVCProvisionProxies() error

func (*Cluster) OpenSVCProvisionProxyService

func (cluster *Cluster) OpenSVCProvisionProxyService(prx *Proxy) error

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 *Cluster) OpenSVCUnprovisionProxyService(prx *Proxy)

func (*Cluster) OpenSVCWaitDequeue

func (cluster *Cluster) OpenSVCWaitDequeue(svc opensvc.Collector, idaction int)

func (*Cluster) PrepareBench

func (cluster *Cluster) PrepareBench() error

func (*Cluster) PrintTopology

func (cluster *Cluster) PrintTopology()

func (*Cluster) RejoinMysqldump

func (cluster *Cluster) RejoinMysqldump(source *ServerMonitor, dest *ServerMonitor) error

func (*Cluster) ReloadConfig

func (cluster *Cluster) ReloadConfig(conf config.Config)

func (*Cluster) ReloadFromSave

func (cluster *Cluster) ReloadFromSave() error

func (*Cluster) ResetFailoverCtr

func (cluster *Cluster) ResetFailoverCtr()

func (*Cluster) RestoreConf

func (cluster *Cluster) RestoreConf()

func (*Cluster) RollingUpgrade

func (cluster *Cluster) RollingUpgrade()

func (*Cluster) Run

func (cluster *Cluster) Run()

func (*Cluster) RunBench

func (cluster *Cluster) RunBench() error

func (*Cluster) RunSysbench

func (cluster *Cluster) RunSysbench() error

func (*Cluster) Save

func (cluster *Cluster) Save() error

func (*Cluster) SetActiveStatus

func (cluster *Cluster) SetActiveStatus(status string)

func (*Cluster) SetBenchMethod

func (cluster *Cluster) SetBenchMethod(m string)

func (*Cluster) SetBinlogServer

func (cluster *Cluster) SetBinlogServer(binlogserver bool)

func (*Cluster) SetCfgGroupDisplay

func (cluster *Cluster) SetCfgGroupDisplay(cfgGroup string)

func (*Cluster) SetCheckFalsePositiveHeartbeat

func (cluster *Cluster) SetCheckFalsePositiveHeartbeat(CheckFalsePositiveHeartbeat bool)

func (*Cluster) SetCleanAll

func (cluster *Cluster) SetCleanAll(check bool)

func (*Cluster) SetFailLimit

func (cluster *Cluster) SetFailLimit(limit int)

func (*Cluster) SetFailRestartUnsafe

func (cluster *Cluster) SetFailRestartUnsafe(check bool)

func (*Cluster) SetFailSync

func (cluster *Cluster) SetFailSync(check bool)

func (*Cluster) SetFailTime

func (cluster *Cluster) SetFailTime(time int64)

func (*Cluster) SetFailoverCtr

func (cluster *Cluster) SetFailoverCtr(failoverCtr int)

func (*Cluster) SetFailoverTs

func (cluster *Cluster) SetFailoverTs(failoverTs int64)

func (*Cluster) SetForceSlaveNoGtid

func (cluster *Cluster) SetForceSlaveNoGtid(forceslavenogtid bool)

func (*Cluster) SetInteractive

func (cluster *Cluster) SetInteractive(check bool)

func (*Cluster) SetLogLevel

func (cluster *Cluster) SetLogLevel(level int)

func (*Cluster) SetLogStdout

func (cluster *Cluster) SetLogStdout()

func (*Cluster) SetMaintenance

func (cluster *Cluster) SetMaintenance(serverid string)

func (*Cluster) SetMasterReadOnly

func (cluster *Cluster) SetMasterReadOnly()

func (*Cluster) SetMasterStateFailed

func (cluster *Cluster) SetMasterStateFailed()

func (*Cluster) SetMultiMaster

func (cluster *Cluster) SetMultiMaster(multimaster bool)

func (*Cluster) SetMultiTierSlave

func (cluster *Cluster) SetMultiTierSlave(multitierslave bool)

topology setter

func (*Cluster) SetPrefMaster

func (cluster *Cluster) SetPrefMaster(PrefMaster string)

func (*Cluster) SetReadOnly

func (cluster *Cluster) SetReadOnly(check bool)

func (*Cluster) SetRejoin

func (cluster *Cluster) SetRejoin(check bool)

func (*Cluster) SetRejoinBackupBinlog

func (cluster *Cluster) SetRejoinBackupBinlog(check bool)

func (*Cluster) SetRejoinDump

func (cluster *Cluster) SetRejoinDump(check bool)

func (*Cluster) SetRejoinFlashback

func (cluster *Cluster) SetRejoinFlashback(check bool)

func (*Cluster) SetRejoinSemisync

func (cluster *Cluster) SetRejoinSemisync(check bool)

func (*Cluster) SetRplChecks

func (cluster *Cluster) SetRplChecks(check bool)

func (*Cluster) SetRplMaxDelay

func (cluster *Cluster) SetRplMaxDelay(delay int64)

func (*Cluster) SetSlavesReadOnly

func (cluster *Cluster) SetSlavesReadOnly(check bool)

func (*Cluster) SetSwitchSync

func (cluster *Cluster) SetSwitchSync(check bool)

func (*Cluster) SetTestMode

func (cluster *Cluster) SetTestMode(check bool)

func (*Cluster) SetTestStartCluster

func (cluster *Cluster) SetTestStartCluster(check bool)

func (*Cluster) SetTestStopCluster

func (cluster *Cluster) SetTestStopCluster(check bool)

func (*Cluster) SetTraffic

func (cluster *Cluster) SetTraffic(traffic bool)

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 *Cluster) StartAllNodes() error

func (*Cluster) StartDatabaseService

func (cluster *Cluster) StartDatabaseService(server *ServerMonitor) error

func (*Cluster) StartSlaves

func (cluster *Cluster) StartSlaves() error

func (*Cluster) Stop

func (cluster *Cluster) Stop()

func (*Cluster) StopDatabaseService

func (cluster *Cluster) StopDatabaseService(server *ServerMonitor) error

func (*Cluster) StopSlaves

func (cluster *Cluster) StopSlaves() error

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

func (cluster *Cluster) TopologyClusterDown() bool

TopologyClusterDown track state all ckuster down

func (*Cluster) TopologyDiscover

func (cluster *Cluster) TopologyDiscover() error

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 *Cluster) UnprovisionProxyService(prx *Proxy) error

func (*Cluster) WaitBootstrapDiscovery

func (cluster *Cluster) WaitBootstrapDiscovery() error

func (*Cluster) WaitClusterStop

func (cluster *Cluster) WaitClusterStop() error

func (*Cluster) WaitDatabaseStart

func (cluster *Cluster) WaitDatabaseStart(server *ServerMonitor) error

func (*Cluster) WaitFailover

func (cluster *Cluster) WaitFailover(wg *sync.WaitGroup)

func (*Cluster) WaitFailoverEnd

func (cluster *Cluster) WaitFailoverEnd() error

func (*Cluster) WaitFailoverEndState

func (cluster *Cluster) WaitFailoverEndState()

func (*Cluster) WaitMariaDBStop

func (cluster *Cluster) WaitMariaDBStop(server *ServerMonitor) error

func (*Cluster) WaitRejoin

func (cluster *Cluster) WaitRejoin(wg *sync.WaitGroup)

func (*Cluster) WaitSwitchover

func (cluster *Cluster) WaitSwitchover(wg *sync.WaitGroup)

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

type Test

type Test struct {
	Name       string        `json:"name"`
	Result     string        `json:"result"`
	ConfigFile string        `json:"config-file"`
	ConfigInit config.Config `json:"config-init"`
	ConfigTest config.Config `json:"config-test"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL