Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddStatusPart ¶
func AddStatusPart()
AddStatusPart adds the vreplication status to the status page.
func StatusSummary ¶
StatusSummary returns the summary status of vreplication.
Types ¶
type ControllerStatus ¶
type ControllerStatus struct { Index uint32 Source string SourceShard string StopPosition string LastPosition string SecondsBehindMaster int64 Counts map[string]int64 Rates map[string][]float64 State string SourceTablet string Messages []string }
ControllerStatus contains a renderable status of a controller.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is the engine for handling vreplication.
func NewEngine ¶
func NewEngine(ts *topo.Server, cell string, mysqld mysqlctl.MysqlDaemon, dbClientFactory func() binlogplayer.DBClient) *Engine
NewEngine creates a new Engine. A nil ts means that the Engine is disabled.
func (*Engine) Exec ¶
Exec executes the query and the related actions. Example insert statement: insert into _vt.vreplication
(workflow, source, pos, max_tps, max_replication_lag, time_updated, transaction_timestamp, state) values ('Resharding', 'keyspace:"ks" shard:"0" tables:"a" tables:"b" ', 'MariaDB/0-1-1083', 9223372036854775807, 9223372036854775807, 481823, 0, 'Running')`
Example update statement: update _vt.vreplication set state='Stopped', message='testing stop' where id=1 Example delete: delete from _vt.vreplication where id=1 Example select: select * from _vt.vreplication
type EngineStatus ¶
type EngineStatus struct { IsOpen bool Controllers []*ControllerStatus }
EngineStatus contains a renderable status of the Engine.