Documentation ¶
Index ¶
- type Client
- func (client *Client) ApplySchema(ctx context.Context, tablet *topodatapb.Tablet, change *tmutils.SchemaChange) (*tabletmanagerdatapb.SchemaChangeResult, error)
- func (client *Client) Backup(ctx context.Context, tablet *topodatapb.Tablet, concurrency int, ...) (logutil.EventStream, error)
- func (client *Client) ChangeType(ctx context.Context, tablet *topodatapb.Tablet, dbType topodatapb.TabletType) error
- func (client *Client) Close()
- func (client *Client) DemoteMaster(ctx context.Context, tablet *topodatapb.Tablet) (*replicationdatapb.MasterStatus, error)
- func (client *Client) ExecuteFetchAsAllPrivs(ctx context.Context, tablet *topodatapb.Tablet, query []byte, maxRows int, ...) (*querypb.QueryResult, error)
- func (client *Client) ExecuteFetchAsApp(ctx context.Context, tablet *topodatapb.Tablet, usePool bool, query []byte, ...) (*querypb.QueryResult, error)
- func (client *Client) ExecuteFetchAsDba(ctx context.Context, tablet *topodatapb.Tablet, usePool bool, query []byte, ...) (*querypb.QueryResult, error)
- func (client *Client) ExecuteHook(ctx context.Context, tablet *topodatapb.Tablet, hk *hook.Hook) (*hook.HookResult, error)
- func (client *Client) GetPermissions(ctx context.Context, tablet *topodatapb.Tablet) (*tabletmanagerdatapb.Permissions, error)
- func (client *Client) GetReplicas(ctx context.Context, tablet *topodatapb.Tablet) ([]string, error)
- func (client *Client) GetSchema(ctx context.Context, tablet *topodatapb.Tablet, tables, excludeTables []string, ...) (*tabletmanagerdatapb.SchemaDefinition, error)
- func (client *Client) IgnoreHealthError(ctx context.Context, tablet *topodatapb.Tablet, pattern string) error
- func (client *Client) InitMaster(ctx context.Context, tablet *topodatapb.Tablet) (string, error)
- func (client *Client) InitReplica(ctx context.Context, tablet *topodatapb.Tablet, parent *topodatapb.TabletAlias, ...) error
- func (client *Client) LockTables(ctx context.Context, tablet *topodatapb.Tablet) error
- func (client *Client) MasterPosition(ctx context.Context, tablet *topodatapb.Tablet) (string, error)
- func (client *Client) MasterStatus(ctx context.Context, tablet *topodatapb.Tablet) (*replicationdatapb.MasterStatus, error)
- func (client *Client) Ping(ctx context.Context, tablet *topodatapb.Tablet) error
- func (client *Client) PopulateReparentJournal(ctx context.Context, tablet *topodatapb.Tablet, timeCreatedNS int64, ...) error
- func (client *Client) PreflightSchema(ctx context.Context, tablet *topodatapb.Tablet, changes []string) ([]*tabletmanagerdatapb.SchemaChangeResult, error)
- func (client *Client) PromoteReplica(ctx context.Context, tablet *topodatapb.Tablet) (string, error)
- func (client *Client) RefreshState(ctx context.Context, tablet *topodatapb.Tablet) error
- func (client *Client) ReloadSchema(ctx context.Context, tablet *topodatapb.Tablet, waitPosition string) error
- func (client *Client) ReplicaWasPromoted(ctx context.Context, tablet *topodatapb.Tablet) error
- func (client *Client) ReplicaWasRestarted(ctx context.Context, tablet *topodatapb.Tablet, parent *topodatapb.TabletAlias) error
- func (client *Client) ReplicationStatus(ctx context.Context, tablet *topodatapb.Tablet) (*replicationdatapb.Status, error)
- func (client *Client) ResetReplication(ctx context.Context, tablet *topodatapb.Tablet) error
- func (client *Client) RestoreFromBackup(ctx context.Context, tablet *topodatapb.Tablet) (logutil.EventStream, error)
- func (client *Client) RunHealthCheck(ctx context.Context, tablet *topodatapb.Tablet) error
- func (client *Client) SetMaster(ctx context.Context, tablet *topodatapb.Tablet, parent *topodatapb.TabletAlias, ...) error
- func (client *Client) SetReadOnly(ctx context.Context, tablet *topodatapb.Tablet) error
- func (client *Client) SetReadWrite(ctx context.Context, tablet *topodatapb.Tablet) error
- func (client *Client) Sleep(ctx context.Context, tablet *topodatapb.Tablet, duration time.Duration) error
- func (client *Client) StartReplication(ctx context.Context, tablet *topodatapb.Tablet) error
- func (client *Client) StartReplicationUntilAfter(ctx context.Context, tablet *topodatapb.Tablet, position string, ...) error
- func (client *Client) StopReplication(ctx context.Context, tablet *topodatapb.Tablet) error
- func (client *Client) StopReplicationAndGetStatus(ctx context.Context, tablet *topodatapb.Tablet, ...) (hybridStatus *replicationdatapb.Status, ...)
- func (client *Client) StopReplicationMinimum(ctx context.Context, tablet *topodatapb.Tablet, minPos string, ...) (string, error)
- func (client *Client) UndoDemoteMaster(ctx context.Context, tablet *topodatapb.Tablet) error
- func (client *Client) UnlockTables(ctx context.Context, tablet *topodatapb.Tablet) error
- func (client *Client) VExec(ctx context.Context, tablet *topodatapb.Tablet, ...) (*querypb.QueryResult, error)
- func (client *Client) VReplicationExec(ctx context.Context, tablet *topodatapb.Tablet, query string) (*querypb.QueryResult, error)
- func (client *Client) VReplicationWaitForPos(ctx context.Context, tablet *topodatapb.Tablet, id int, pos string) error
- func (client *Client) WaitForPosition(ctx context.Context, tablet *topodatapb.Tablet, pos string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements tmclient.TabletManagerClient
func (*Client) ApplySchema ¶
func (client *Client) ApplySchema(ctx context.Context, tablet *topodatapb.Tablet, change *tmutils.SchemaChange) (*tabletmanagerdatapb.SchemaChangeResult, error)
ApplySchema is part of the tmclient.TabletManagerClient interface.
func (*Client) Backup ¶
func (client *Client) Backup(ctx context.Context, tablet *topodatapb.Tablet, concurrency int, allowMaster bool) (logutil.EventStream, error)
Backup is part of the tmclient.TabletManagerClient interface.
func (*Client) ChangeType ¶
func (client *Client) ChangeType(ctx context.Context, tablet *topodatapb.Tablet, dbType topodatapb.TabletType) error
ChangeType is part of the tmclient.TabletManagerClient interface.
func (*Client) Close ¶
func (client *Client) Close()
Close is part of the tmclient.TabletManagerClient interface.
func (*Client) DemoteMaster ¶
func (client *Client) DemoteMaster(ctx context.Context, tablet *topodatapb.Tablet) (*replicationdatapb.MasterStatus, error)
DemoteMaster is part of the tmclient.TabletManagerClient interface.
func (*Client) ExecuteFetchAsAllPrivs ¶
func (client *Client) ExecuteFetchAsAllPrivs(ctx context.Context, tablet *topodatapb.Tablet, query []byte, maxRows int, reloadSchema bool) (*querypb.QueryResult, error)
ExecuteFetchAsAllPrivs is part of the tmclient.TabletManagerClient interface.
func (*Client) ExecuteFetchAsApp ¶
func (client *Client) ExecuteFetchAsApp(ctx context.Context, tablet *topodatapb.Tablet, usePool bool, query []byte, maxRows int) (*querypb.QueryResult, error)
ExecuteFetchAsApp is part of the tmclient.TabletManagerClient interface.
func (*Client) ExecuteFetchAsDba ¶
func (client *Client) ExecuteFetchAsDba(ctx context.Context, tablet *topodatapb.Tablet, usePool bool, query []byte, maxRows int, disableBinlogs, reloadSchema bool) (*querypb.QueryResult, error)
ExecuteFetchAsDba is part of the tmclient.TabletManagerClient interface.
func (*Client) ExecuteHook ¶
func (client *Client) ExecuteHook(ctx context.Context, tablet *topodatapb.Tablet, 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 *topodatapb.Tablet) (*tabletmanagerdatapb.Permissions, error)
GetPermissions is part of the tmclient.TabletManagerClient interface.
func (*Client) GetReplicas ¶
GetReplicas is part of the tmclient.TabletManagerClient interface.
func (*Client) GetSchema ¶
func (client *Client) GetSchema(ctx context.Context, tablet *topodatapb.Tablet, tables, excludeTables []string, includeViews bool) (*tabletmanagerdatapb.SchemaDefinition, error)
GetSchema is part of the tmclient.TabletManagerClient interface.
func (*Client) IgnoreHealthError ¶
func (client *Client) IgnoreHealthError(ctx context.Context, tablet *topodatapb.Tablet, pattern string) error
IgnoreHealthError is part of the tmclient.TabletManagerClient interface.
func (*Client) InitMaster ¶
InitMaster is part of the tmclient.TabletManagerClient interface.
func (*Client) InitReplica ¶
func (client *Client) InitReplica(ctx context.Context, tablet *topodatapb.Tablet, parent *topodatapb.TabletAlias, replicationPosition string, timeCreatedNS int64) error
InitReplica is part of the tmclient.TabletManagerClient interface.
func (*Client) LockTables ¶
LockTables is part of the tmclient.TabletManagerClient interface.
func (*Client) MasterPosition ¶
func (client *Client) MasterPosition(ctx context.Context, tablet *topodatapb.Tablet) (string, error)
MasterPosition is part of the tmclient.TabletManagerClient interface.
func (*Client) MasterStatus ¶
func (client *Client) MasterStatus(ctx context.Context, tablet *topodatapb.Tablet) (*replicationdatapb.MasterStatus, error)
MasterStatus is part of the tmclient.TabletManagerClient interface.
func (*Client) PopulateReparentJournal ¶
func (client *Client) PopulateReparentJournal(ctx context.Context, tablet *topodatapb.Tablet, timeCreatedNS int64, actionName string, masterAlias *topodatapb.TabletAlias, pos string) error
PopulateReparentJournal is part of the tmclient.TabletManagerClient interface.
func (*Client) PreflightSchema ¶
func (client *Client) PreflightSchema(ctx context.Context, tablet *topodatapb.Tablet, changes []string) ([]*tabletmanagerdatapb.SchemaChangeResult, error)
PreflightSchema is part of the tmclient.TabletManagerClient interface.
func (*Client) PromoteReplica ¶
func (client *Client) PromoteReplica(ctx context.Context, tablet *topodatapb.Tablet) (string, error)
PromoteReplica is part of the tmclient.TabletManagerClient interface.
func (*Client) RefreshState ¶
RefreshState is part of the tmclient.TabletManagerClient interface.
func (*Client) ReloadSchema ¶
func (client *Client) ReloadSchema(ctx context.Context, tablet *topodatapb.Tablet, waitPosition string) error
ReloadSchema is part of the tmclient.TabletManagerClient interface.
func (*Client) ReplicaWasPromoted ¶
ReplicaWasPromoted is part of the tmclient.TabletManagerClient interface.
func (*Client) ReplicaWasRestarted ¶
func (client *Client) ReplicaWasRestarted(ctx context.Context, tablet *topodatapb.Tablet, parent *topodatapb.TabletAlias) error
ReplicaWasRestarted is part of the tmclient.TabletManagerClient interface.
func (*Client) ReplicationStatus ¶
func (client *Client) ReplicationStatus(ctx context.Context, tablet *topodatapb.Tablet) (*replicationdatapb.Status, error)
ReplicationStatus is part of the tmclient.TabletManagerClient interface.
func (*Client) ResetReplication ¶
ResetReplication is part of the tmclient.TabletManagerClient interface.
func (*Client) RestoreFromBackup ¶
func (client *Client) RestoreFromBackup(ctx context.Context, tablet *topodatapb.Tablet) (logutil.EventStream, error)
RestoreFromBackup is part of the tmclient.TabletManagerClient interface.
func (*Client) RunHealthCheck ¶
RunHealthCheck is part of the tmclient.TabletManagerClient interface.
func (*Client) SetMaster ¶
func (client *Client) SetMaster(ctx context.Context, tablet *topodatapb.Tablet, parent *topodatapb.TabletAlias, timeCreatedNS int64, waitPosition string, forceStartReplication 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) Sleep ¶
func (client *Client) Sleep(ctx context.Context, tablet *topodatapb.Tablet, duration time.Duration) error
Sleep is part of the tmclient.TabletManagerClient interface.
func (*Client) StartReplication ¶
StartReplication is part of the tmclient.TabletManagerClient interface.
func (*Client) StartReplicationUntilAfter ¶
func (client *Client) StartReplicationUntilAfter(ctx context.Context, tablet *topodatapb.Tablet, position string, waitTime time.Duration) error
StartReplicationUntilAfter is part of the tmclient.TabletManagerClient interface.
func (*Client) StopReplication ¶
StopReplication is part of the tmclient.TabletManagerClient interface.
func (*Client) StopReplicationAndGetStatus ¶
func (client *Client) StopReplicationAndGetStatus(ctx context.Context, tablet *topodatapb.Tablet, stopReplicationMode replicationdatapb.StopReplicationMode) (hybridStatus *replicationdatapb.Status, status *replicationdatapb.StopReplicationStatus, err error)
StopReplicationAndGetStatus is part of the tmclient.TabletManagerClient interface.
func (*Client) StopReplicationMinimum ¶
func (client *Client) StopReplicationMinimum(ctx context.Context, tablet *topodatapb.Tablet, minPos string, waitTime time.Duration) (string, error)
StopReplicationMinimum is part of the tmclient.TabletManagerClient interface.
func (*Client) UndoDemoteMaster ¶
UndoDemoteMaster is part of the tmclient.TabletManagerClient interface.
func (*Client) UnlockTables ¶
UnlockTables is part of the tmclient.TabletManagerClient interface.
func (*Client) VExec ¶ added in v0.8.0
func (client *Client) VExec(ctx context.Context, tablet *topodatapb.Tablet, query, workflow, keyspace string) (*querypb.QueryResult, error)
VExec is part of the tmclient.TabletManagerClient interface.
func (*Client) VReplicationExec ¶
func (client *Client) VReplicationExec(ctx context.Context, tablet *topodatapb.Tablet, query string) (*querypb.QueryResult, error)
VReplicationExec is part of the tmclient.TabletManagerClient interface.
func (*Client) VReplicationWaitForPos ¶
func (client *Client) VReplicationWaitForPos(ctx context.Context, tablet *topodatapb.Tablet, id int, pos string) error
VReplicationWaitForPos is part of the tmclient.TabletManagerClient interface.
func (*Client) WaitForPosition ¶
func (client *Client) WaitForPosition(ctx context.Context, tablet *topodatapb.Tablet, pos string) error
WaitForPosition is part of the tmclient.TabletManagerClient interface.