Documentation ¶
Index ¶
- func RegisterTabletManagerConnFactory(name string, factory TabletManagerConnFactory)
- func SignalInterrupt()
- func WaitForCompletion(ts topo.Server, actionPath string, waitTime time.Duration) (interface{}, error)
- type ActionInitiator
- func (ai *ActionInitiator) ApplySchema(tabletAlias topo.TabletAlias, sc *myproto.SchemaChange) (actionPath string, err error)
- func (ai *ActionInitiator) BreakSlaves(tabletAlias topo.TabletAlias) (actionPath string, err error)
- func (ai *ActionInitiator) ChangeType(tabletAlias topo.TabletAlias, dbType topo.TabletType) (actionPath string, err error)
- func (ai *ActionInitiator) DemoteMaster(tabletAlias topo.TabletAlias) (actionPath string, err error)
- func (ai *ActionInitiator) ExecuteHook(tabletAlias topo.TabletAlias, _hook *hook.Hook) (actionPath string, err error)
- func (ai *ActionInitiator) GetPermissions(tabletAlias topo.TabletAlias, waitTime time.Duration) (*myproto.Permissions, error)
- func (ai *ActionInitiator) GetSchema(tablet *topo.TabletInfo, tables []string, includeViews bool, ...) (*myproto.SchemaDefinition, error)
- func (ai *ActionInitiator) GetSlaves(tablet *topo.TabletInfo, waitTime time.Duration) ([]string, error)
- func (ai *ActionInitiator) MasterPosition(tablet *topo.TabletInfo, waitTime time.Duration) (*myproto.ReplicationPosition, error)
- func (ai *ActionInitiator) MultiRestore(tabletAlias topo.TabletAlias, args *actionnode.MultiRestoreArgs) (actionPath string, err error)
- func (ai *ActionInitiator) MultiSnapshot(tabletAlias topo.TabletAlias, args *actionnode.MultiSnapshotArgs) (actionPath string, err error)
- func (ai *ActionInitiator) Ping(tabletAlias topo.TabletAlias) (actionPath string, err error)
- func (ai *ActionInitiator) PreflightSchema(tabletAlias topo.TabletAlias, change string) (actionPath string, err error)
- func (ai *ActionInitiator) PromoteSlave(tabletAlias topo.TabletAlias) (actionPath string, err error)
- func (ai *ActionInitiator) ReloadSchema(tablet *topo.TabletInfo, waitTime time.Duration) error
- func (ai *ActionInitiator) ReparentPosition(tabletAlias topo.TabletAlias, slavePos *myproto.ReplicationPosition) (actionPath string, err error)
- func (ai *ActionInitiator) ReserveForRestore(dstTabletAlias topo.TabletAlias, args *actionnode.ReserveForRestoreArgs) (actionPath string, err error)
- func (ai *ActionInitiator) RestartSlave(tabletAlias topo.TabletAlias, args *actionnode.RestartSlaveData) (actionPath string, err error)
- func (ai *ActionInitiator) Restore(dstTabletAlias topo.TabletAlias, args *actionnode.RestoreArgs) (actionPath string, err error)
- func (ai *ActionInitiator) RpcChangeType(tablet *topo.TabletInfo, dbType topo.TabletType, waitTime time.Duration) error
- func (ai *ActionInitiator) RpcPing(tabletAlias topo.TabletAlias, waitTime time.Duration) error
- func (ai *ActionInitiator) RpcSlaveWasPromoted(tablet *topo.TabletInfo, waitTime time.Duration) error
- func (ai *ActionInitiator) RpcSlaveWasRestarted(tablet *topo.TabletInfo, args *actionnode.SlaveWasRestartedArgs, ...) error
- func (ai *ActionInitiator) RunBlpUntil(tabletAlias topo.TabletAlias, positions *myproto.BlpPositionList, ...) (*myproto.ReplicationPosition, error)
- func (ai *ActionInitiator) Scrap(tabletAlias topo.TabletAlias) (actionPath string, err error)
- func (ai *ActionInitiator) SetBlacklistedTables(tablet *topo.TabletInfo, tables []string, waitTime time.Duration) error
- func (ai *ActionInitiator) SetReadOnly(tabletAlias topo.TabletAlias) (actionPath string, err error)
- func (ai *ActionInitiator) SetReadWrite(tabletAlias topo.TabletAlias) (actionPath string, err error)
- func (ai *ActionInitiator) SlavePosition(tablet *topo.TabletInfo, waitTime time.Duration) (*myproto.ReplicationPosition, error)
- func (ai *ActionInitiator) SlaveWasPromoted(tabletAlias topo.TabletAlias) (actionPath string, err error)
- func (ai *ActionInitiator) SlaveWasRestarted(tabletAlias topo.TabletAlias, args *actionnode.SlaveWasRestartedArgs) (actionPath string, err error)
- func (ai *ActionInitiator) Sleep(tabletAlias topo.TabletAlias, duration time.Duration) (actionPath string, err error)
- func (ai *ActionInitiator) Snapshot(tabletAlias topo.TabletAlias, args *actionnode.SnapshotArgs) (actionPath string, err error)
- func (ai *ActionInitiator) SnapshotSourceEnd(tabletAlias topo.TabletAlias, args *actionnode.SnapshotSourceEndArgs) (actionPath string, err error)
- func (ai *ActionInitiator) StartBlp(tabletAlias topo.TabletAlias, waitTime time.Duration) error
- func (ai *ActionInitiator) StartSlave(tabletAlias topo.TabletAlias, waitTime time.Duration) error
- func (ai *ActionInitiator) StopBlp(tabletAlias topo.TabletAlias, waitTime time.Duration) (*myproto.BlpPositionList, error)
- func (ai *ActionInitiator) StopSlave(tablet *topo.TabletInfo, waitTime time.Duration) error
- func (ai *ActionInitiator) StopSlaveMinimum(tabletAlias topo.TabletAlias, groupId int64, waitTime time.Duration) (*myproto.ReplicationPosition, error)
- func (ai *ActionInitiator) WaitBlpPosition(tabletAlias topo.TabletAlias, blpPosition myproto.BlpPosition, ...) error
- func (ai *ActionInitiator) WaitForCompletion(actionPath string, waitTime time.Duration) error
- func (ai *ActionInitiator) WaitForCompletionReply(actionPath string, waitTime time.Duration) (interface{}, error)
- func (ai *ActionInitiator) WaitSlavePosition(tablet *topo.TabletInfo, replicationPosition *myproto.ReplicationPosition, ...) (*myproto.ReplicationPosition, error)
- type InitiatorError
- type TabletManagerConn
- type TabletManagerConnFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTabletManagerConnFactory ¶
func RegisterTabletManagerConnFactory(name string, factory TabletManagerConnFactory)
func SignalInterrupt ¶
func SignalInterrupt()
In certain cases (vtctl most notably) having SIGINT manifest itself as an instant timeout lets us break out cleanly.
Types ¶
type ActionInitiator ¶
type ActionInitiator struct {
// contains filtered or unexported fields
}
func NewActionInitiator ¶
func NewActionInitiator(ts topo.Server, tabletManagerProtocol string) *ActionInitiator
func (*ActionInitiator) ApplySchema ¶
func (ai *ActionInitiator) ApplySchema(tabletAlias topo.TabletAlias, sc *myproto.SchemaChange) (actionPath string, err error)
func (*ActionInitiator) BreakSlaves ¶
func (ai *ActionInitiator) BreakSlaves(tabletAlias topo.TabletAlias) (actionPath string, err error)
func (*ActionInitiator) ChangeType ¶
func (ai *ActionInitiator) ChangeType(tabletAlias topo.TabletAlias, dbType topo.TabletType) (actionPath string, err error)
func (*ActionInitiator) DemoteMaster ¶
func (ai *ActionInitiator) DemoteMaster(tabletAlias topo.TabletAlias) (actionPath string, err error)
func (*ActionInitiator) ExecuteHook ¶
func (ai *ActionInitiator) ExecuteHook(tabletAlias topo.TabletAlias, _hook *hook.Hook) (actionPath string, err error)
func (*ActionInitiator) GetPermissions ¶
func (ai *ActionInitiator) GetPermissions(tabletAlias topo.TabletAlias, waitTime time.Duration) (*myproto.Permissions, error)
func (*ActionInitiator) GetSchema ¶
func (ai *ActionInitiator) GetSchema(tablet *topo.TabletInfo, tables []string, includeViews bool, waitTime time.Duration) (*myproto.SchemaDefinition, error)
func (*ActionInitiator) GetSlaves ¶
func (ai *ActionInitiator) GetSlaves(tablet *topo.TabletInfo, waitTime time.Duration) ([]string, error)
func (*ActionInitiator) MasterPosition ¶
func (ai *ActionInitiator) MasterPosition(tablet *topo.TabletInfo, waitTime time.Duration) (*myproto.ReplicationPosition, error)
func (*ActionInitiator) MultiRestore ¶
func (ai *ActionInitiator) MultiRestore(tabletAlias topo.TabletAlias, args *actionnode.MultiRestoreArgs) (actionPath string, err error)
func (*ActionInitiator) MultiSnapshot ¶
func (ai *ActionInitiator) MultiSnapshot(tabletAlias topo.TabletAlias, args *actionnode.MultiSnapshotArgs) (actionPath string, err error)
func (*ActionInitiator) Ping ¶
func (ai *ActionInitiator) Ping(tabletAlias topo.TabletAlias) (actionPath string, err error)
func (*ActionInitiator) PreflightSchema ¶
func (ai *ActionInitiator) PreflightSchema(tabletAlias topo.TabletAlias, change string) (actionPath string, err error)
func (*ActionInitiator) PromoteSlave ¶
func (ai *ActionInitiator) PromoteSlave(tabletAlias topo.TabletAlias) (actionPath string, err error)
func (*ActionInitiator) ReloadSchema ¶
func (ai *ActionInitiator) ReloadSchema(tablet *topo.TabletInfo, waitTime time.Duration) error
func (*ActionInitiator) ReparentPosition ¶
func (ai *ActionInitiator) ReparentPosition(tabletAlias topo.TabletAlias, slavePos *myproto.ReplicationPosition) (actionPath string, err error)
func (*ActionInitiator) ReserveForRestore ¶
func (ai *ActionInitiator) ReserveForRestore(dstTabletAlias topo.TabletAlias, args *actionnode.ReserveForRestoreArgs) (actionPath string, err error)
func (*ActionInitiator) RestartSlave ¶
func (ai *ActionInitiator) RestartSlave(tabletAlias topo.TabletAlias, args *actionnode.RestartSlaveData) (actionPath string, err error)
func (*ActionInitiator) Restore ¶
func (ai *ActionInitiator) Restore(dstTabletAlias topo.TabletAlias, args *actionnode.RestoreArgs) (actionPath string, err error)
func (*ActionInitiator) RpcChangeType ¶
func (ai *ActionInitiator) RpcChangeType(tablet *topo.TabletInfo, dbType topo.TabletType, waitTime time.Duration) error
func (*ActionInitiator) RpcPing ¶
func (ai *ActionInitiator) RpcPing(tabletAlias topo.TabletAlias, waitTime time.Duration) error
func (*ActionInitiator) RpcSlaveWasPromoted ¶
func (ai *ActionInitiator) RpcSlaveWasPromoted(tablet *topo.TabletInfo, waitTime time.Duration) error
func (*ActionInitiator) RpcSlaveWasRestarted ¶
func (ai *ActionInitiator) RpcSlaveWasRestarted(tablet *topo.TabletInfo, args *actionnode.SlaveWasRestartedArgs, waitTime time.Duration) error
func (*ActionInitiator) RunBlpUntil ¶
func (ai *ActionInitiator) RunBlpUntil(tabletAlias topo.TabletAlias, positions *myproto.BlpPositionList, waitTime time.Duration) (*myproto.ReplicationPosition, error)
func (*ActionInitiator) Scrap ¶
func (ai *ActionInitiator) Scrap(tabletAlias topo.TabletAlias) (actionPath string, err error)
func (*ActionInitiator) SetBlacklistedTables ¶
func (ai *ActionInitiator) SetBlacklistedTables(tablet *topo.TabletInfo, tables []string, waitTime time.Duration) error
func (*ActionInitiator) SetReadOnly ¶
func (ai *ActionInitiator) SetReadOnly(tabletAlias topo.TabletAlias) (actionPath string, err error)
func (*ActionInitiator) SetReadWrite ¶
func (ai *ActionInitiator) SetReadWrite(tabletAlias topo.TabletAlias) (actionPath string, err error)
func (*ActionInitiator) SlavePosition ¶
func (ai *ActionInitiator) SlavePosition(tablet *topo.TabletInfo, waitTime time.Duration) (*myproto.ReplicationPosition, error)
func (*ActionInitiator) SlaveWasPromoted ¶
func (ai *ActionInitiator) SlaveWasPromoted(tabletAlias topo.TabletAlias) (actionPath string, err error)
func (*ActionInitiator) SlaveWasRestarted ¶
func (ai *ActionInitiator) SlaveWasRestarted(tabletAlias topo.TabletAlias, args *actionnode.SlaveWasRestartedArgs) (actionPath string, err error)
func (*ActionInitiator) Sleep ¶
func (ai *ActionInitiator) Sleep(tabletAlias topo.TabletAlias, duration time.Duration) (actionPath string, err error)
func (*ActionInitiator) Snapshot ¶
func (ai *ActionInitiator) Snapshot(tabletAlias topo.TabletAlias, args *actionnode.SnapshotArgs) (actionPath string, err error)
func (*ActionInitiator) SnapshotSourceEnd ¶
func (ai *ActionInitiator) SnapshotSourceEnd(tabletAlias topo.TabletAlias, args *actionnode.SnapshotSourceEndArgs) (actionPath string, err error)
func (*ActionInitiator) StartBlp ¶
func (ai *ActionInitiator) StartBlp(tabletAlias topo.TabletAlias, waitTime time.Duration) error
func (*ActionInitiator) StartSlave ¶
func (ai *ActionInitiator) StartSlave(tabletAlias topo.TabletAlias, waitTime time.Duration) error
func (*ActionInitiator) StopBlp ¶
func (ai *ActionInitiator) StopBlp(tabletAlias topo.TabletAlias, waitTime time.Duration) (*myproto.BlpPositionList, error)
func (*ActionInitiator) StopSlave ¶
func (ai *ActionInitiator) StopSlave(tablet *topo.TabletInfo, waitTime time.Duration) error
func (*ActionInitiator) StopSlaveMinimum ¶
func (ai *ActionInitiator) StopSlaveMinimum(tabletAlias topo.TabletAlias, groupId int64, waitTime time.Duration) (*myproto.ReplicationPosition, error)
func (*ActionInitiator) WaitBlpPosition ¶
func (ai *ActionInitiator) WaitBlpPosition(tabletAlias topo.TabletAlias, blpPosition myproto.BlpPosition, waitTime time.Duration) error
func (*ActionInitiator) WaitForCompletion ¶
func (ai *ActionInitiator) WaitForCompletion(actionPath string, waitTime time.Duration) error
func (*ActionInitiator) WaitForCompletionReply ¶
func (ai *ActionInitiator) WaitForCompletionReply(actionPath string, waitTime time.Duration) (interface{}, error)
func (*ActionInitiator) WaitSlavePosition ¶
func (ai *ActionInitiator) WaitSlavePosition(tablet *topo.TabletInfo, replicationPosition *myproto.ReplicationPosition, waitTime time.Duration) (*myproto.ReplicationPosition, error)
type InitiatorError ¶
type InitiatorError string
func (InitiatorError) Error ¶
func (e InitiatorError) Error() string
type TabletManagerConn ¶
type TabletManagerConn interface { // Ping will try to ping the remote tablet Ping(tablet *topo.TabletInfo, waitTime time.Duration) error // GetSchema asks the remote tablet for its database schema GetSchema(tablet *topo.TabletInfo, tables []string, includeViews bool, waitTime time.Duration) (*myproto.SchemaDefinition, error) // GetPermissions asks the remote tablet for its permissions list GetPermissions(tablet *topo.TabletInfo, waitTime time.Duration) (*myproto.Permissions, error) // ChangeType asks the remote tablet to change its type ChangeType(tablet *topo.TabletInfo, dbType topo.TabletType, waitTime time.Duration) error // SetBlacklistedTables asks the remote tablet to change its // blacklisted tables list SetBlacklistedTables(tablet *topo.TabletInfo, tables []string, waitTime time.Duration) error // ReloadSchema asks the remote tablet to reload its schema ReloadSchema(tablet *topo.TabletInfo, waitTime time.Duration) error // SlavePosition returns the tablet's mysql slave position SlavePosition(tablet *topo.TabletInfo, waitTime time.Duration) (*myproto.ReplicationPosition, error) // WaitSlavePosition asks the tablet to wait until it reaches that // position in mysql replication WaitSlavePosition(tablet *topo.TabletInfo, replicationPosition *myproto.ReplicationPosition, waitTime time.Duration) (*myproto.ReplicationPosition, error) // MasterPosition returns the tablet's master position MasterPosition(tablet *topo.TabletInfo, waitTime time.Duration) (*myproto.ReplicationPosition, error) // StopSlave stops the mysql replication StopSlave(tablet *topo.TabletInfo, waitTime time.Duration) error // StopSlaveMinimum stops the mysql replication after it reaches // the provided minimum point StopSlaveMinimum(tablet *topo.TabletInfo, groupId int64, waitTime time.Duration) (*myproto.ReplicationPosition, error) // StartSlave starts the mysql replication StartSlave(tablet *topo.TabletInfo, waitTime time.Duration) error // GetSlaves returns the addresses of the slaves GetSlaves(tablet *topo.TabletInfo, waitTime time.Duration) ([]string, error) // WaitBlpPosition asks the tablet to wait until it reaches that // position in replication WaitBlpPosition(tablet *topo.TabletInfo, blpPosition myproto.BlpPosition, waitTime time.Duration) error // StopBlp asks the tablet to stop all its binlog players, // and returns the current position for all of them StopBlp(tablet *topo.TabletInfo, waitTime time.Duration) (*myproto.BlpPositionList, error) // StartBlp asks the tablet to restart its binlog players StartBlp(tablet *topo.TabletInfo, waitTime time.Duration) error // RunBlpUntil asks the tablet to restart its binlog players until // it reaches the given positions, if not there yet. RunBlpUntil(tablet *topo.TabletInfo, positions *myproto.BlpPositionList, waitTime time.Duration) (*myproto.ReplicationPosition, error) // SlaveWasPromoted tells the remote tablet it is now the master SlaveWasPromoted(tablet *topo.TabletInfo, waitTime time.Duration) error // SlaveWasRestarted tells the remote tablet its master has changed SlaveWasRestarted(tablet *topo.TabletInfo, args *actionnode.SlaveWasRestartedArgs, waitTime time.Duration) error }
TabletManagerConn defines the interface used to talk to a remote tablet
type TabletManagerConnFactory ¶
type TabletManagerConnFactory func(topo.Server) TabletManagerConn
Click to show internal directories.
Click to hide internal directories.