Versions in this module Expand all Collapse all v0 v0.16.3 Nov 29, 2024 Changes in this version + var RegisterQueryServices []RegisterQueryService + func ConfigHTML() template.HTML + func SetReparentFlags(timeout time.Duration) + type ActionAgent struct + Cnf *mysqlctl.Mycnf + DBConfigs *dbconfigs.DBConfigs + DemoteMasterType topodatapb.TabletType + HealthReporter health.Reporter + History *history.History + MysqlDaemon mysqlctl.MysqlDaemon + QueryServiceControl tabletserver.Controller + TabletAlias *topodatapb.TabletAlias + TopoServer *topo.Server + UpdateStream binlog.UpdateStreamControl + VREngine *vreplication.Engine + func NewActionAgent(batchCtx context.Context, ts *topo.Server, mysqld mysqlctl.MysqlDaemon, ...) (agent *ActionAgent, err error) + func NewComboActionAgent(batchCtx context.Context, ts *topo.Server, tabletAlias *topodatapb.TabletAlias, ...) *ActionAgent + func NewTestActionAgent(batchCtx context.Context, ts *topo.Server, tabletAlias *topodatapb.TabletAlias, ...) *ActionAgent + func (agent *ActionAgent) ApplySchema(ctx context.Context, change *tmutils.SchemaChange) (*tabletmanagerdatapb.SchemaChangeResult, error) + func (agent *ActionAgent) Backup(ctx context.Context, concurrency int, logger logutil.Logger, allowMaster bool) error + func (agent *ActionAgent) BlacklistedTables() []string + func (agent *ActionAgent) ChangeType(ctx context.Context, tabletType topodatapb.TabletType) error + func (agent *ActionAgent) Close() + func (agent *ActionAgent) DemoteMaster(ctx context.Context) (string, error) + func (agent *ActionAgent) DisallowQueryService() string + func (agent *ActionAgent) EnableUpdateStream() bool + func (agent *ActionAgent) ExecuteFetchAsAllPrivs(ctx context.Context, query []byte, dbName string, maxrows int, ...) (*querypb.QueryResult, error) + func (agent *ActionAgent) ExecuteFetchAsApp(ctx context.Context, query []byte, maxrows int) (*querypb.QueryResult, error) + func (agent *ActionAgent) ExecuteFetchAsDba(ctx context.Context, query []byte, dbName string, maxrows int, ...) (*querypb.QueryResult, error) + func (agent *ActionAgent) ExecuteHook(ctx context.Context, hk *hook.Hook) *hook.HookResult + func (agent *ActionAgent) GetPermissions(ctx context.Context) (*tabletmanagerdatapb.Permissions, error) + func (agent *ActionAgent) GetSchema(ctx context.Context, tables, excludeTables []string, includeViews bool) (*tabletmanagerdatapb.SchemaDefinition, error) + func (agent *ActionAgent) GetSlaves(ctx context.Context) ([]string, error) + func (agent *ActionAgent) HandleRPCPanic(ctx context.Context, name string, args, reply interface{}, verbose bool, ...) + func (agent *ActionAgent) Healthy() (time.Duration, error) + func (agent *ActionAgent) IgnoreHealthError(ctx context.Context, pattern string) error + func (agent *ActionAgent) InitMaster(ctx context.Context) (string, error) + func (agent *ActionAgent) InitSlave(ctx context.Context, parent *topodatapb.TabletAlias, position string, ...) error + func (agent *ActionAgent) InitTablet(port, gRPCPort int32) error + func (agent *ActionAgent) LockTables(ctx context.Context) error + func (agent *ActionAgent) MasterPosition(ctx context.Context) (string, error) + func (agent *ActionAgent) Ping(ctx context.Context, args string) string + func (agent *ActionAgent) PopulateReparentJournal(ctx context.Context, timeCreatedNS int64, actionName string, ...) error + func (agent *ActionAgent) PreflightSchema(ctx context.Context, changes []string) ([]*tabletmanagerdatapb.SchemaChangeResult, error) + func (agent *ActionAgent) PromoteSlave(ctx context.Context) (string, error) + func (agent *ActionAgent) PromoteSlaveWhenCaughtUp(ctx context.Context, position string) (string, error) + func (agent *ActionAgent) RefreshState(ctx context.Context) error + func (agent *ActionAgent) ReloadSchema(ctx context.Context, waitPosition string) error + func (agent *ActionAgent) ResetReplication(ctx context.Context) error + func (agent *ActionAgent) RestoreData(ctx context.Context, logger logutil.Logger, ...) error + func (agent *ActionAgent) RestoreFromBackup(ctx context.Context, logger logutil.Logger) error + func (agent *ActionAgent) RunHealthCheck(ctx context.Context) + func (agent *ActionAgent) SetMaster(ctx context.Context, parentAlias *topodatapb.TabletAlias, timeCreatedNS int64, ...) error + func (agent *ActionAgent) SetReadOnly(ctx context.Context, rdonly bool) error + func (agent *ActionAgent) SlaveStatus(ctx context.Context) (*replicationdatapb.Status, error) + func (agent *ActionAgent) SlaveWasPromoted(ctx context.Context) error + func (agent *ActionAgent) SlaveWasRestarted(ctx context.Context, parent *topodatapb.TabletAlias) error + func (agent *ActionAgent) Sleep(ctx context.Context, duration time.Duration) + func (agent *ActionAgent) Start(ctx context.Context, mysqlHost string, mysqlPort, vtPort, gRPCPort int32, ...) error + func (agent *ActionAgent) StartSlave(ctx context.Context) error + func (agent *ActionAgent) StartSlaveUntilAfter(ctx context.Context, position string, waitTime time.Duration) error + func (agent *ActionAgent) Stop() + func (agent *ActionAgent) StopReplicationAndGetStatus(ctx context.Context) (*replicationdatapb.Status, error) + func (agent *ActionAgent) StopSlave(ctx context.Context) error + func (agent *ActionAgent) StopSlaveMinimum(ctx context.Context, position string, waitTime time.Duration) (string, error) + func (agent *ActionAgent) Tablet() *topodatapb.Tablet + func (agent *ActionAgent) TabletExternallyReparented(ctx context.Context, externalID string) error + func (agent *ActionAgent) UndoDemoteMaster(ctx context.Context) error + func (agent *ActionAgent) UnlockTables(ctx context.Context) error + func (agent *ActionAgent) VReplicationExec(ctx context.Context, query string) (*querypb.QueryResult, error) + func (agent *ActionAgent) VReplicationWaitForPos(ctx context.Context, id int, pos string) error + func (agent *ActionAgent) WaitForPosition(ctx context.Context, pos string) error + type HealthRecord struct + Error error + IgnoreErrorExpr string + IgnoredError error + ReplicationDelay time.Duration + Time time.Time + func (r *HealthRecord) Class() string + func (r *HealthRecord) Degraded() bool + func (r *HealthRecord) ErrorString() string + func (r *HealthRecord) HTML() template.HTML + func (r *HealthRecord) IgnoredErrorString() string + func (r *HealthRecord) IsDuplicate(other interface{}) bool + type RPCAgent interface + ApplySchema func(ctx context.Context, change *tmutils.SchemaChange) (*tabletmanagerdatapb.SchemaChangeResult, error) + Backup func(ctx context.Context, concurrency int, logger logutil.Logger, allowMaster bool) error + ChangeType func(ctx context.Context, tabletType topodatapb.TabletType) error + DemoteMaster func(ctx context.Context) (string, error) + ExecuteFetchAsAllPrivs func(ctx context.Context, query []byte, dbName string, maxrows int, ...) (*querypb.QueryResult, error) + ExecuteFetchAsApp func(ctx context.Context, query []byte, maxrows int) (*querypb.QueryResult, error) + ExecuteFetchAsDba func(ctx context.Context, query []byte, dbName string, maxrows int, ...) (*querypb.QueryResult, error) + ExecuteHook func(ctx context.Context, hk *hook.Hook) *hook.HookResult + GetPermissions func(ctx context.Context) (*tabletmanagerdatapb.Permissions, error) + GetSchema func(ctx context.Context, tables, excludeTables []string, includeViews bool) (*tabletmanagerdatapb.SchemaDefinition, error) + GetSlaves func(ctx context.Context) ([]string, error) + HandleRPCPanic func(ctx context.Context, name string, args, reply interface{}, verbose bool, ...) + IgnoreHealthError func(ctx context.Context, pattern string) error + InitMaster func(ctx context.Context) (string, error) + InitSlave func(ctx context.Context, parent *topodatapb.TabletAlias, ...) error + LockTables func(ctx context.Context) error + MasterPosition func(ctx context.Context) (string, error) + Ping func(ctx context.Context, args string) string + PopulateReparentJournal func(ctx context.Context, timeCreatedNS int64, actionName string, ...) error + PreflightSchema func(ctx context.Context, changes []string) ([]*tabletmanagerdatapb.SchemaChangeResult, error) + PromoteSlave func(ctx context.Context) (string, error) + PromoteSlaveWhenCaughtUp func(ctx context.Context, replicationPosition string) (string, error) + RefreshState func(ctx context.Context) error + ReloadSchema func(ctx context.Context, waitPosition string) error + ResetReplication func(ctx context.Context) error + RestoreFromBackup func(ctx context.Context, logger logutil.Logger) error + RunHealthCheck func(ctx context.Context) + SetMaster func(ctx context.Context, parent *topodatapb.TabletAlias, timeCreatedNS int64, ...) error + SetReadOnly func(ctx context.Context, rdonly bool) error + SlaveStatus func(ctx context.Context) (*replicationdatapb.Status, error) + SlaveWasPromoted func(ctx context.Context) error + SlaveWasRestarted func(ctx context.Context, parent *topodatapb.TabletAlias) error + Sleep func(ctx context.Context, duration time.Duration) + StartSlave func(ctx context.Context) error + StartSlaveUntilAfter func(ctx context.Context, position string, waitTime time.Duration) error + StopReplicationAndGetStatus func(ctx context.Context) (*replicationdatapb.Status, error) + StopSlave func(ctx context.Context) error + StopSlaveMinimum func(ctx context.Context, position string, waitTime time.Duration) (string, error) + TabletExternallyReparented func(ctx context.Context, externalID string) error + UndoDemoteMaster func(ctx context.Context) error + UnlockTables func(ctx context.Context) error + VReplicationExec func(ctx context.Context, query string) (*querypb.QueryResult, error) + VReplicationWaitForPos func(ctx context.Context, id int, pos string) error + WaitForPosition func(ctx context.Context, pos string) error + type RegisterQueryService func(*ActionAgent) + type Reporter struct + func (r *Reporter) HTMLName() template.HTML + func (r *Reporter) Report(isSlaveType, shouldQueryServiceBeRunning bool) (time.Duration, error)