Documentation ¶
Index ¶
- type Client
- func (client *Client) ApplySchema(ctx context.Context, tablet *topo.TabletInfo, change *myproto.SchemaChange) (*myproto.SchemaChangeResult, error)
- func (client *Client) Backup(ctx context.Context, tablet *topo.TabletInfo, concurrency int) (<-chan *logutil.LoggerEvent, tmclient.ErrFunc, error)
- func (client *Client) ChangeType(ctx context.Context, tablet *topo.TabletInfo, dbType pbt.TabletType) error
- func (client *Client) DemoteMaster(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationPosition, error)
- func (client *Client) ExecuteFetchAsApp(ctx context.Context, tablet *topo.TabletInfo, query string, maxRows int, ...) (*mproto.QueryResult, error)
- func (client *Client) ExecuteFetchAsDba(ctx context.Context, tablet *topo.TabletInfo, query string, maxRows int, ...) (*mproto.QueryResult, error)
- func (client *Client) ExecuteHook(ctx context.Context, tablet *topo.TabletInfo, hk *hook.Hook) (*hook.HookResult, error)
- func (client *Client) GetPermissions(ctx context.Context, tablet *topo.TabletInfo) (*myproto.Permissions, error)
- func (client *Client) GetSchema(ctx context.Context, tablet *topo.TabletInfo, tables, excludeTables []string, ...) (*myproto.SchemaDefinition, error)
- func (client *Client) GetSlaves(ctx context.Context, tablet *topo.TabletInfo) ([]string, error)
- func (client *Client) InitMaster(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationPosition, error)
- func (client *Client) InitSlave(ctx context.Context, tablet *topo.TabletInfo, parent *pbt.TabletAlias, ...) error
- func (client *Client) IsTimeoutError(err error) bool
- func (client *Client) MasterPosition(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationPosition, error)
- func (client *Client) Ping(ctx context.Context, tablet *topo.TabletInfo) error
- func (client *Client) PopulateReparentJournal(ctx context.Context, tablet *topo.TabletInfo, timeCreatedNS int64, ...) error
- func (client *Client) PreflightSchema(ctx context.Context, tablet *topo.TabletInfo, change string) (*myproto.SchemaChangeResult, error)
- func (client *Client) PromoteSlave(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationPosition, error)
- func (client *Client) PromoteSlaveWhenCaughtUp(ctx context.Context, tablet *topo.TabletInfo, pos myproto.ReplicationPosition) (myproto.ReplicationPosition, error)
- func (client *Client) RefreshState(ctx context.Context, tablet *topo.TabletInfo) error
- func (client *Client) ReloadSchema(ctx context.Context, tablet *topo.TabletInfo) error
- func (client *Client) ResetReplication(ctx context.Context, tablet *topo.TabletInfo) error
- func (client *Client) RunBlpUntil(ctx context.Context, tablet *topo.TabletInfo, ...) (myproto.ReplicationPosition, error)
- func (client *Client) RunHealthCheck(ctx context.Context, tablet *topo.TabletInfo, targetTabletType pbt.TabletType) error
- func (client *Client) Scrap(ctx context.Context, tablet *topo.TabletInfo) error
- func (client *Client) SetMaster(ctx context.Context, tablet *topo.TabletInfo, parent *pbt.TabletAlias, ...) error
- func (client *Client) SetReadOnly(ctx context.Context, tablet *topo.TabletInfo) error
- func (client *Client) SetReadWrite(ctx context.Context, tablet *topo.TabletInfo) error
- func (client *Client) SlaveStatus(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationStatus, error)
- func (client *Client) SlaveWasPromoted(ctx context.Context, tablet *topo.TabletInfo) error
- func (client *Client) SlaveWasRestarted(ctx context.Context, tablet *topo.TabletInfo, ...) error
- func (client *Client) Sleep(ctx context.Context, tablet *topo.TabletInfo, duration time.Duration) error
- func (client *Client) StartBlp(ctx context.Context, tablet *topo.TabletInfo) error
- func (client *Client) StartSlave(ctx context.Context, tablet *topo.TabletInfo) error
- func (client *Client) StopBlp(ctx context.Context, tablet *topo.TabletInfo) (*blproto.BlpPositionList, error)
- func (client *Client) StopReplicationAndGetStatus(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationStatus, error)
- func (client *Client) StopSlave(ctx context.Context, tablet *topo.TabletInfo) error
- func (client *Client) StopSlaveMinimum(ctx context.Context, tablet *topo.TabletInfo, ...) (myproto.ReplicationPosition, error)
- func (client *Client) TabletExternallyReparented(ctx context.Context, tablet *topo.TabletInfo, externalID string) error
- func (client *Client) WaitBlpPosition(ctx context.Context, tablet *topo.TabletInfo, blpPosition blproto.BlpPosition, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct{}
Client implements tmclient.TabletManagerClient
func (*Client) ApplySchema ¶
func (client *Client) ApplySchema(ctx context.Context, tablet *topo.TabletInfo, change *myproto.SchemaChange) (*myproto.SchemaChangeResult, error)
ApplySchema is part of the tmclient.TabletManagerClient interface
func (*Client) Backup ¶
func (client *Client) Backup(ctx context.Context, tablet *topo.TabletInfo, concurrency int) (<-chan *logutil.LoggerEvent, tmclient.ErrFunc, error)
Backup is part of the tmclient.TabletManagerClient interface
func (*Client) ChangeType ¶
func (client *Client) ChangeType(ctx context.Context, tablet *topo.TabletInfo, dbType pbt.TabletType) error
ChangeType is part of the tmclient.TabletManagerClient interface
func (*Client) DemoteMaster ¶
func (client *Client) DemoteMaster(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationPosition, error)
DemoteMaster is part of the tmclient.TabletManagerClient interface
func (*Client) ExecuteFetchAsApp ¶
func (client *Client) ExecuteFetchAsApp(ctx context.Context, tablet *topo.TabletInfo, query string, maxRows int, wantFields bool) (*mproto.QueryResult, error)
ExecuteFetchAsApp is part of the tmclient.TabletManagerClient interface
func (*Client) ExecuteFetchAsDba ¶
func (client *Client) ExecuteFetchAsDba(ctx context.Context, tablet *topo.TabletInfo, query string, maxRows int, wantFields, disableBinlogs, reloadSchema bool) (*mproto.QueryResult, error)
ExecuteFetchAsDba is part of the tmclient.TabletManagerClient interface
func (*Client) ExecuteHook ¶
func (client *Client) ExecuteHook(ctx context.Context, tablet *topo.TabletInfo, hk *hook.Hook) (*hook.HookResult, error)
ExecuteHook is part of the tmclient.TabletManagerClient interface
func (*Client) GetPermissions ¶
func (client *Client) GetPermissions(ctx context.Context, tablet *topo.TabletInfo) (*myproto.Permissions, error)
GetPermissions is part of the tmclient.TabletManagerClient interface
func (*Client) GetSchema ¶
func (client *Client) GetSchema(ctx context.Context, tablet *topo.TabletInfo, tables, excludeTables []string, includeViews bool) (*myproto.SchemaDefinition, error)
GetSchema is part of the tmclient.TabletManagerClient interface
func (*Client) InitMaster ¶
func (client *Client) InitMaster(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationPosition, error)
InitMaster is part of the tmclient.TabletManagerClient interface
func (*Client) InitSlave ¶
func (client *Client) InitSlave(ctx context.Context, tablet *topo.TabletInfo, parent *pbt.TabletAlias, replicationPosition myproto.ReplicationPosition, timeCreatedNS int64) error
InitSlave is part of the tmclient.TabletManagerClient interface
func (*Client) IsTimeoutError ¶
IsTimeoutError is part of the tmclient.TabletManagerClient interface
func (*Client) MasterPosition ¶
func (client *Client) MasterPosition(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationPosition, error)
MasterPosition is part of the tmclient.TabletManagerClient interface
func (*Client) PopulateReparentJournal ¶
func (client *Client) PopulateReparentJournal(ctx context.Context, tablet *topo.TabletInfo, timeCreatedNS int64, actionName string, masterAlias *pbt.TabletAlias, pos myproto.ReplicationPosition) error
PopulateReparentJournal is part of the tmclient.TabletManagerClient interface
func (*Client) PreflightSchema ¶
func (client *Client) PreflightSchema(ctx context.Context, tablet *topo.TabletInfo, change string) (*myproto.SchemaChangeResult, error)
PreflightSchema is part of the tmclient.TabletManagerClient interface
func (*Client) PromoteSlave ¶
func (client *Client) PromoteSlave(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationPosition, error)
PromoteSlave is part of the tmclient.TabletManagerClient interface
func (*Client) PromoteSlaveWhenCaughtUp ¶
func (client *Client) PromoteSlaveWhenCaughtUp(ctx context.Context, tablet *topo.TabletInfo, pos myproto.ReplicationPosition) (myproto.ReplicationPosition, error)
PromoteSlaveWhenCaughtUp is part of the tmclient.TabletManagerClient interface
func (*Client) RefreshState ¶
RefreshState is part of the tmclient.TabletManagerClient interface
func (*Client) ReloadSchema ¶
ReloadSchema is part of the tmclient.TabletManagerClient interface
func (*Client) ResetReplication ¶
ResetReplication is part of the tmclient.TabletManagerClient interface
func (*Client) RunBlpUntil ¶
func (client *Client) RunBlpUntil(ctx context.Context, tablet *topo.TabletInfo, positions *blproto.BlpPositionList, waitTime time.Duration) (myproto.ReplicationPosition, error)
RunBlpUntil is part of the tmclient.TabletManagerClient interface
func (*Client) RunHealthCheck ¶
func (client *Client) RunHealthCheck(ctx context.Context, tablet *topo.TabletInfo, targetTabletType pbt.TabletType) error
RunHealthCheck is part of the tmclient.TabletManagerClient interface
func (*Client) SetMaster ¶
func (client *Client) SetMaster(ctx context.Context, tablet *topo.TabletInfo, parent *pbt.TabletAlias, timeCreatedNS int64, forceStartSlave bool) error
SetMaster is part of the tmclient.TabletManagerClient interface
func (*Client) SetReadOnly ¶
SetReadOnly is part of the tmclient.TabletManagerClient interface
func (*Client) SetReadWrite ¶
SetReadWrite is part of the tmclient.TabletManagerClient interface
func (*Client) SlaveStatus ¶
func (client *Client) SlaveStatus(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationStatus, error)
SlaveStatus is part of the tmclient.TabletManagerClient interface
func (*Client) SlaveWasPromoted ¶
SlaveWasPromoted is part of the tmclient.TabletManagerClient interface
func (*Client) SlaveWasRestarted ¶
func (client *Client) SlaveWasRestarted(ctx context.Context, tablet *topo.TabletInfo, args *actionnode.SlaveWasRestartedArgs) error
SlaveWasRestarted is part of the tmclient.TabletManagerClient interface
func (*Client) Sleep ¶
func (client *Client) Sleep(ctx context.Context, tablet *topo.TabletInfo, duration time.Duration) error
Sleep is part of the tmclient.TabletManagerClient interface
func (*Client) StartSlave ¶
StartSlave is part of the tmclient.TabletManagerClient interface
func (*Client) StopBlp ¶
func (client *Client) StopBlp(ctx context.Context, tablet *topo.TabletInfo) (*blproto.BlpPositionList, error)
StopBlp is part of the tmclient.TabletManagerClient interface
func (*Client) StopReplicationAndGetStatus ¶
func (client *Client) StopReplicationAndGetStatus(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationStatus, error)
StopReplicationAndGetStatus is part of the tmclient.TabletManagerClient interface
func (*Client) StopSlaveMinimum ¶
func (client *Client) StopSlaveMinimum(ctx context.Context, tablet *topo.TabletInfo, minPos myproto.ReplicationPosition, waitTime time.Duration) (myproto.ReplicationPosition, error)
StopSlaveMinimum is part of the tmclient.TabletManagerClient interface
func (*Client) TabletExternallyReparented ¶
func (client *Client) TabletExternallyReparented(ctx context.Context, tablet *topo.TabletInfo, externalID string) error
TabletExternallyReparented is part of the tmclient.TabletManagerClient interface
func (*Client) WaitBlpPosition ¶
func (client *Client) WaitBlpPosition(ctx context.Context, tablet *topo.TabletInfo, blpPosition blproto.BlpPosition, waitTime time.Duration) error
WaitBlpPosition is part of the tmclient.TabletManagerClient interface