vtctlservicev16connect

package
v0.0.0-...-770e144 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VtctlName is the fully-qualified name of the Vtctl service.
	VtctlName = "vtctlservice.Vtctl"
	// VtctldName is the fully-qualified name of the Vtctld service.
	VtctldName = "vtctlservice.Vtctld"
)
View Source
const (
	// VtctlExecuteVtctlCommandProcedure is the fully-qualified name of the Vtctl's ExecuteVtctlCommand
	// RPC.
	VtctlExecuteVtctlCommandProcedure = "/vtctlservice.Vtctl/ExecuteVtctlCommand"
	// VtctldAddCellInfoProcedure is the fully-qualified name of the Vtctld's AddCellInfo RPC.
	VtctldAddCellInfoProcedure = "/vtctlservice.Vtctld/AddCellInfo"
	// VtctldAddCellsAliasProcedure is the fully-qualified name of the Vtctld's AddCellsAlias RPC.
	VtctldAddCellsAliasProcedure = "/vtctlservice.Vtctld/AddCellsAlias"
	// VtctldApplyRoutingRulesProcedure is the fully-qualified name of the Vtctld's ApplyRoutingRules
	// RPC.
	VtctldApplyRoutingRulesProcedure = "/vtctlservice.Vtctld/ApplyRoutingRules"
	// VtctldApplySchemaProcedure is the fully-qualified name of the Vtctld's ApplySchema RPC.
	VtctldApplySchemaProcedure = "/vtctlservice.Vtctld/ApplySchema"
	// VtctldApplyShardRoutingRulesProcedure is the fully-qualified name of the Vtctld's
	// ApplyShardRoutingRules RPC.
	VtctldApplyShardRoutingRulesProcedure = "/vtctlservice.Vtctld/ApplyShardRoutingRules"
	// VtctldApplyVSchemaProcedure is the fully-qualified name of the Vtctld's ApplyVSchema RPC.
	VtctldApplyVSchemaProcedure = "/vtctlservice.Vtctld/ApplyVSchema"
	// VtctldBackupProcedure is the fully-qualified name of the Vtctld's Backup RPC.
	VtctldBackupProcedure = "/vtctlservice.Vtctld/Backup"
	// VtctldBackupShardProcedure is the fully-qualified name of the Vtctld's BackupShard RPC.
	VtctldBackupShardProcedure = "/vtctlservice.Vtctld/BackupShard"
	// VtctldChangeTabletTypeProcedure is the fully-qualified name of the Vtctld's ChangeTabletType RPC.
	VtctldChangeTabletTypeProcedure = "/vtctlservice.Vtctld/ChangeTabletType"
	// VtctldCreateKeyspaceProcedure is the fully-qualified name of the Vtctld's CreateKeyspace RPC.
	VtctldCreateKeyspaceProcedure = "/vtctlservice.Vtctld/CreateKeyspace"
	// VtctldCreateShardProcedure is the fully-qualified name of the Vtctld's CreateShard RPC.
	VtctldCreateShardProcedure = "/vtctlservice.Vtctld/CreateShard"
	// VtctldDeleteCellInfoProcedure is the fully-qualified name of the Vtctld's DeleteCellInfo RPC.
	VtctldDeleteCellInfoProcedure = "/vtctlservice.Vtctld/DeleteCellInfo"
	// VtctldDeleteCellsAliasProcedure is the fully-qualified name of the Vtctld's DeleteCellsAlias RPC.
	VtctldDeleteCellsAliasProcedure = "/vtctlservice.Vtctld/DeleteCellsAlias"
	// VtctldDeleteKeyspaceProcedure is the fully-qualified name of the Vtctld's DeleteKeyspace RPC.
	VtctldDeleteKeyspaceProcedure = "/vtctlservice.Vtctld/DeleteKeyspace"
	// VtctldDeleteShardsProcedure is the fully-qualified name of the Vtctld's DeleteShards RPC.
	VtctldDeleteShardsProcedure = "/vtctlservice.Vtctld/DeleteShards"
	// VtctldDeleteSrvVSchemaProcedure is the fully-qualified name of the Vtctld's DeleteSrvVSchema RPC.
	VtctldDeleteSrvVSchemaProcedure = "/vtctlservice.Vtctld/DeleteSrvVSchema"
	// VtctldDeleteTabletsProcedure is the fully-qualified name of the Vtctld's DeleteTablets RPC.
	VtctldDeleteTabletsProcedure = "/vtctlservice.Vtctld/DeleteTablets"
	// VtctldEmergencyReparentShardProcedure is the fully-qualified name of the Vtctld's
	// EmergencyReparentShard RPC.
	VtctldEmergencyReparentShardProcedure = "/vtctlservice.Vtctld/EmergencyReparentShard"
	// VtctldExecuteFetchAsAppProcedure is the fully-qualified name of the Vtctld's ExecuteFetchAsApp
	// RPC.
	VtctldExecuteFetchAsAppProcedure = "/vtctlservice.Vtctld/ExecuteFetchAsApp"
	// VtctldExecuteFetchAsDBAProcedure is the fully-qualified name of the Vtctld's ExecuteFetchAsDBA
	// RPC.
	VtctldExecuteFetchAsDBAProcedure = "/vtctlservice.Vtctld/ExecuteFetchAsDBA"
	// VtctldExecuteHookProcedure is the fully-qualified name of the Vtctld's ExecuteHook RPC.
	VtctldExecuteHookProcedure = "/vtctlservice.Vtctld/ExecuteHook"
	// VtctldFindAllShardsInKeyspaceProcedure is the fully-qualified name of the Vtctld's
	// FindAllShardsInKeyspace RPC.
	VtctldFindAllShardsInKeyspaceProcedure = "/vtctlservice.Vtctld/FindAllShardsInKeyspace"
	// VtctldGetBackupsProcedure is the fully-qualified name of the Vtctld's GetBackups RPC.
	VtctldGetBackupsProcedure = "/vtctlservice.Vtctld/GetBackups"
	// VtctldGetCellInfoProcedure is the fully-qualified name of the Vtctld's GetCellInfo RPC.
	VtctldGetCellInfoProcedure = "/vtctlservice.Vtctld/GetCellInfo"
	// VtctldGetCellInfoNamesProcedure is the fully-qualified name of the Vtctld's GetCellInfoNames RPC.
	VtctldGetCellInfoNamesProcedure = "/vtctlservice.Vtctld/GetCellInfoNames"
	// VtctldGetCellsAliasesProcedure is the fully-qualified name of the Vtctld's GetCellsAliases RPC.
	VtctldGetCellsAliasesProcedure = "/vtctlservice.Vtctld/GetCellsAliases"
	// VtctldGetFullStatusProcedure is the fully-qualified name of the Vtctld's GetFullStatus RPC.
	VtctldGetFullStatusProcedure = "/vtctlservice.Vtctld/GetFullStatus"
	// VtctldGetKeyspaceProcedure is the fully-qualified name of the Vtctld's GetKeyspace RPC.
	VtctldGetKeyspaceProcedure = "/vtctlservice.Vtctld/GetKeyspace"
	// VtctldGetKeyspacesProcedure is the fully-qualified name of the Vtctld's GetKeyspaces RPC.
	VtctldGetKeyspacesProcedure = "/vtctlservice.Vtctld/GetKeyspaces"
	// VtctldGetPermissionsProcedure is the fully-qualified name of the Vtctld's GetPermissions RPC.
	VtctldGetPermissionsProcedure = "/vtctlservice.Vtctld/GetPermissions"
	// VtctldGetRoutingRulesProcedure is the fully-qualified name of the Vtctld's GetRoutingRules RPC.
	VtctldGetRoutingRulesProcedure = "/vtctlservice.Vtctld/GetRoutingRules"
	// VtctldGetSchemaProcedure is the fully-qualified name of the Vtctld's GetSchema RPC.
	VtctldGetSchemaProcedure = "/vtctlservice.Vtctld/GetSchema"
	// VtctldGetShardProcedure is the fully-qualified name of the Vtctld's GetShard RPC.
	VtctldGetShardProcedure = "/vtctlservice.Vtctld/GetShard"
	// VtctldGetShardRoutingRulesProcedure is the fully-qualified name of the Vtctld's
	// GetShardRoutingRules RPC.
	VtctldGetShardRoutingRulesProcedure = "/vtctlservice.Vtctld/GetShardRoutingRules"
	// VtctldGetSrvKeyspaceNamesProcedure is the fully-qualified name of the Vtctld's
	// GetSrvKeyspaceNames RPC.
	VtctldGetSrvKeyspaceNamesProcedure = "/vtctlservice.Vtctld/GetSrvKeyspaceNames"
	// VtctldGetSrvKeyspacesProcedure is the fully-qualified name of the Vtctld's GetSrvKeyspaces RPC.
	VtctldGetSrvKeyspacesProcedure = "/vtctlservice.Vtctld/GetSrvKeyspaces"
	// VtctldUpdateThrottlerConfigProcedure is the fully-qualified name of the Vtctld's
	// UpdateThrottlerConfig RPC.
	VtctldUpdateThrottlerConfigProcedure = "/vtctlservice.Vtctld/UpdateThrottlerConfig"
	// VtctldGetSrvVSchemaProcedure is the fully-qualified name of the Vtctld's GetSrvVSchema RPC.
	VtctldGetSrvVSchemaProcedure = "/vtctlservice.Vtctld/GetSrvVSchema"
	// VtctldGetSrvVSchemasProcedure is the fully-qualified name of the Vtctld's GetSrvVSchemas RPC.
	VtctldGetSrvVSchemasProcedure = "/vtctlservice.Vtctld/GetSrvVSchemas"
	// VtctldGetTabletProcedure is the fully-qualified name of the Vtctld's GetTablet RPC.
	VtctldGetTabletProcedure = "/vtctlservice.Vtctld/GetTablet"
	// VtctldGetTabletsProcedure is the fully-qualified name of the Vtctld's GetTablets RPC.
	VtctldGetTabletsProcedure = "/vtctlservice.Vtctld/GetTablets"
	// VtctldGetTopologyPathProcedure is the fully-qualified name of the Vtctld's GetTopologyPath RPC.
	VtctldGetTopologyPathProcedure = "/vtctlservice.Vtctld/GetTopologyPath"
	// VtctldGetVersionProcedure is the fully-qualified name of the Vtctld's GetVersion RPC.
	VtctldGetVersionProcedure = "/vtctlservice.Vtctld/GetVersion"
	// VtctldGetVSchemaProcedure is the fully-qualified name of the Vtctld's GetVSchema RPC.
	VtctldGetVSchemaProcedure = "/vtctlservice.Vtctld/GetVSchema"
	// VtctldGetWorkflowsProcedure is the fully-qualified name of the Vtctld's GetWorkflows RPC.
	VtctldGetWorkflowsProcedure = "/vtctlservice.Vtctld/GetWorkflows"
	// VtctldInitShardPrimaryProcedure is the fully-qualified name of the Vtctld's InitShardPrimary RPC.
	VtctldInitShardPrimaryProcedure = "/vtctlservice.Vtctld/InitShardPrimary"
	// VtctldPingTabletProcedure is the fully-qualified name of the Vtctld's PingTablet RPC.
	VtctldPingTabletProcedure = "/vtctlservice.Vtctld/PingTablet"
	// VtctldPlannedReparentShardProcedure is the fully-qualified name of the Vtctld's
	// PlannedReparentShard RPC.
	VtctldPlannedReparentShardProcedure = "/vtctlservice.Vtctld/PlannedReparentShard"
	// VtctldRebuildKeyspaceGraphProcedure is the fully-qualified name of the Vtctld's
	// RebuildKeyspaceGraph RPC.
	VtctldRebuildKeyspaceGraphProcedure = "/vtctlservice.Vtctld/RebuildKeyspaceGraph"
	// VtctldRebuildVSchemaGraphProcedure is the fully-qualified name of the Vtctld's
	// RebuildVSchemaGraph RPC.
	VtctldRebuildVSchemaGraphProcedure = "/vtctlservice.Vtctld/RebuildVSchemaGraph"
	// VtctldRefreshStateProcedure is the fully-qualified name of the Vtctld's RefreshState RPC.
	VtctldRefreshStateProcedure = "/vtctlservice.Vtctld/RefreshState"
	// VtctldRefreshStateByShardProcedure is the fully-qualified name of the Vtctld's
	// RefreshStateByShard RPC.
	VtctldRefreshStateByShardProcedure = "/vtctlservice.Vtctld/RefreshStateByShard"
	// VtctldReloadSchemaProcedure is the fully-qualified name of the Vtctld's ReloadSchema RPC.
	VtctldReloadSchemaProcedure = "/vtctlservice.Vtctld/ReloadSchema"
	// VtctldReloadSchemaKeyspaceProcedure is the fully-qualified name of the Vtctld's
	// ReloadSchemaKeyspace RPC.
	VtctldReloadSchemaKeyspaceProcedure = "/vtctlservice.Vtctld/ReloadSchemaKeyspace"
	// VtctldReloadSchemaShardProcedure is the fully-qualified name of the Vtctld's ReloadSchemaShard
	// RPC.
	VtctldReloadSchemaShardProcedure = "/vtctlservice.Vtctld/ReloadSchemaShard"
	// VtctldRemoveBackupProcedure is the fully-qualified name of the Vtctld's RemoveBackup RPC.
	VtctldRemoveBackupProcedure = "/vtctlservice.Vtctld/RemoveBackup"
	// VtctldRemoveKeyspaceCellProcedure is the fully-qualified name of the Vtctld's RemoveKeyspaceCell
	// RPC.
	VtctldRemoveKeyspaceCellProcedure = "/vtctlservice.Vtctld/RemoveKeyspaceCell"
	// VtctldRemoveShardCellProcedure is the fully-qualified name of the Vtctld's RemoveShardCell RPC.
	VtctldRemoveShardCellProcedure = "/vtctlservice.Vtctld/RemoveShardCell"
	// VtctldReparentTabletProcedure is the fully-qualified name of the Vtctld's ReparentTablet RPC.
	VtctldReparentTabletProcedure = "/vtctlservice.Vtctld/ReparentTablet"
	// VtctldRestoreFromBackupProcedure is the fully-qualified name of the Vtctld's RestoreFromBackup
	// RPC.
	VtctldRestoreFromBackupProcedure = "/vtctlservice.Vtctld/RestoreFromBackup"
	// VtctldRunHealthCheckProcedure is the fully-qualified name of the Vtctld's RunHealthCheck RPC.
	VtctldRunHealthCheckProcedure = "/vtctlservice.Vtctld/RunHealthCheck"
	// VtctldSetKeyspaceDurabilityPolicyProcedure is the fully-qualified name of the Vtctld's
	// SetKeyspaceDurabilityPolicy RPC.
	VtctldSetKeyspaceDurabilityPolicyProcedure = "/vtctlservice.Vtctld/SetKeyspaceDurabilityPolicy"
	// VtctldSetShardIsPrimaryServingProcedure is the fully-qualified name of the Vtctld's
	// SetShardIsPrimaryServing RPC.
	VtctldSetShardIsPrimaryServingProcedure = "/vtctlservice.Vtctld/SetShardIsPrimaryServing"
	// VtctldSetShardTabletControlProcedure is the fully-qualified name of the Vtctld's
	// SetShardTabletControl RPC.
	VtctldSetShardTabletControlProcedure = "/vtctlservice.Vtctld/SetShardTabletControl"
	// VtctldSetWritableProcedure is the fully-qualified name of the Vtctld's SetWritable RPC.
	VtctldSetWritableProcedure = "/vtctlservice.Vtctld/SetWritable"
	// VtctldShardReplicationAddProcedure is the fully-qualified name of the Vtctld's
	// ShardReplicationAdd RPC.
	VtctldShardReplicationAddProcedure = "/vtctlservice.Vtctld/ShardReplicationAdd"
	// VtctldShardReplicationFixProcedure is the fully-qualified name of the Vtctld's
	// ShardReplicationFix RPC.
	VtctldShardReplicationFixProcedure = "/vtctlservice.Vtctld/ShardReplicationFix"
	// VtctldShardReplicationPositionsProcedure is the fully-qualified name of the Vtctld's
	// ShardReplicationPositions RPC.
	VtctldShardReplicationPositionsProcedure = "/vtctlservice.Vtctld/ShardReplicationPositions"
	// VtctldShardReplicationRemoveProcedure is the fully-qualified name of the Vtctld's
	// ShardReplicationRemove RPC.
	VtctldShardReplicationRemoveProcedure = "/vtctlservice.Vtctld/ShardReplicationRemove"
	// VtctldSleepTabletProcedure is the fully-qualified name of the Vtctld's SleepTablet RPC.
	VtctldSleepTabletProcedure = "/vtctlservice.Vtctld/SleepTablet"
	// VtctldSourceShardAddProcedure is the fully-qualified name of the Vtctld's SourceShardAdd RPC.
	VtctldSourceShardAddProcedure = "/vtctlservice.Vtctld/SourceShardAdd"
	// VtctldSourceShardDeleteProcedure is the fully-qualified name of the Vtctld's SourceShardDelete
	// RPC.
	VtctldSourceShardDeleteProcedure = "/vtctlservice.Vtctld/SourceShardDelete"
	// VtctldStartReplicationProcedure is the fully-qualified name of the Vtctld's StartReplication RPC.
	VtctldStartReplicationProcedure = "/vtctlservice.Vtctld/StartReplication"
	// VtctldStopReplicationProcedure is the fully-qualified name of the Vtctld's StopReplication RPC.
	VtctldStopReplicationProcedure = "/vtctlservice.Vtctld/StopReplication"
	// VtctldTabletExternallyReparentedProcedure is the fully-qualified name of the Vtctld's
	// TabletExternallyReparented RPC.
	VtctldTabletExternallyReparentedProcedure = "/vtctlservice.Vtctld/TabletExternallyReparented"
	// VtctldUpdateCellInfoProcedure is the fully-qualified name of the Vtctld's UpdateCellInfo RPC.
	VtctldUpdateCellInfoProcedure = "/vtctlservice.Vtctld/UpdateCellInfo"
	// VtctldUpdateCellsAliasProcedure is the fully-qualified name of the Vtctld's UpdateCellsAlias RPC.
	VtctldUpdateCellsAliasProcedure = "/vtctlservice.Vtctld/UpdateCellsAlias"
	// VtctldValidateProcedure is the fully-qualified name of the Vtctld's Validate RPC.
	VtctldValidateProcedure = "/vtctlservice.Vtctld/Validate"
	// VtctldValidateKeyspaceProcedure is the fully-qualified name of the Vtctld's ValidateKeyspace RPC.
	VtctldValidateKeyspaceProcedure = "/vtctlservice.Vtctld/ValidateKeyspace"
	// VtctldValidateSchemaKeyspaceProcedure is the fully-qualified name of the Vtctld's
	// ValidateSchemaKeyspace RPC.
	VtctldValidateSchemaKeyspaceProcedure = "/vtctlservice.Vtctld/ValidateSchemaKeyspace"
	// VtctldValidateShardProcedure is the fully-qualified name of the Vtctld's ValidateShard RPC.
	VtctldValidateShardProcedure = "/vtctlservice.Vtctld/ValidateShard"
	// VtctldValidateVersionKeyspaceProcedure is the fully-qualified name of the Vtctld's
	// ValidateVersionKeyspace RPC.
	VtctldValidateVersionKeyspaceProcedure = "/vtctlservice.Vtctld/ValidateVersionKeyspace"
	// VtctldValidateVersionShardProcedure is the fully-qualified name of the Vtctld's
	// ValidateVersionShard RPC.
	VtctldValidateVersionShardProcedure = "/vtctlservice.Vtctld/ValidateVersionShard"
	// VtctldValidateVSchemaProcedure is the fully-qualified name of the Vtctld's ValidateVSchema RPC.
	VtctldValidateVSchemaProcedure = "/vtctlservice.Vtctld/ValidateVSchema"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

Variables

This section is empty.

Functions

func NewVtctlHandler

func NewVtctlHandler(svc VtctlHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewVtctlHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewVtctldHandler

func NewVtctldHandler(svc VtctldHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewVtctldHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type UnimplementedVtctlHandler

type UnimplementedVtctlHandler struct{}

UnimplementedVtctlHandler returns CodeUnimplemented from all methods.

type UnimplementedVtctldHandler

type UnimplementedVtctldHandler struct{}

UnimplementedVtctldHandler returns CodeUnimplemented from all methods.

type VtctlClient

VtctlClient is a client for the vtctlservice.Vtctl service.

func NewVtctlClient

func NewVtctlClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) VtctlClient

NewVtctlClient constructs a client for the vtctlservice.Vtctl service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type VtctlHandler

VtctlHandler is an implementation of the vtctlservice.Vtctl service.

type VtctldClient

type VtctldClient interface {
	// AddCellInfo registers a local topology service in a new cell by creating
	// the CellInfo with the provided parameters.
	AddCellInfo(context.Context, *connect.Request[v16.AddCellInfoRequest]) (*connect.Response[v16.AddCellInfoResponse], error)
	// AddCellsAlias defines a group of cells that can be referenced by a single
	// name (the alias).
	//
	// When routing query traffic, replica/rdonly traffic can be routed across
	// cells within the group (alias). Only primary traffic can be routed across
	// cells not in the same group (alias).
	AddCellsAlias(context.Context, *connect.Request[v16.AddCellsAliasRequest]) (*connect.Response[v16.AddCellsAliasResponse], error)
	// ApplyRoutingRules applies the VSchema routing rules.
	ApplyRoutingRules(context.Context, *connect.Request[v16.ApplyRoutingRulesRequest]) (*connect.Response[v16.ApplyRoutingRulesResponse], error)
	// ApplySchema applies a schema to a keyspace.
	ApplySchema(context.Context, *connect.Request[v16.ApplySchemaRequest]) (*connect.Response[v16.ApplySchemaResponse], error)
	// ApplyShardRoutingRules applies the VSchema shard routing rules.
	ApplyShardRoutingRules(context.Context, *connect.Request[v16.ApplyShardRoutingRulesRequest]) (*connect.Response[v16.ApplyShardRoutingRulesResponse], error)
	// ApplyVSchema applies a vschema to a keyspace.
	ApplyVSchema(context.Context, *connect.Request[v16.ApplyVSchemaRequest]) (*connect.Response[v16.ApplyVSchemaResponse], error)
	// Backup uses the BackupEngine and BackupStorage services on the specified
	// tablet to create and store a new backup.
	Backup(context.Context, *connect.Request[v16.BackupRequest]) (*connect.ServerStreamForClient[v16.BackupResponse], error)
	// BackupShard chooses a tablet in the shard and uses it to create a backup.
	BackupShard(context.Context, *connect.Request[v16.BackupShardRequest]) (*connect.ServerStreamForClient[v16.BackupResponse], error)
	// ChangeTabletType changes the db type for the specified tablet, if possible.
	// This is used primarily to arrange replicas, and it will not convert a
	// primary. For that, use InitShardPrimary.
	//
	// NOTE: This command automatically updates the serving graph.
	ChangeTabletType(context.Context, *connect.Request[v16.ChangeTabletTypeRequest]) (*connect.Response[v16.ChangeTabletTypeResponse], error)
	// CreateKeyspace creates the specified keyspace in the topology. For a
	// SNAPSHOT keyspace, the request must specify the name of a base keyspace,
	// as well as a snapshot time.
	CreateKeyspace(context.Context, *connect.Request[v16.CreateKeyspaceRequest]) (*connect.Response[v16.CreateKeyspaceResponse], error)
	// CreateShard creates the specified shard in the topology.
	CreateShard(context.Context, *connect.Request[v16.CreateShardRequest]) (*connect.Response[v16.CreateShardResponse], error)
	// DeleteCellInfo deletes the CellInfo for the provided cell. The cell cannot
	// be referenced by any Shard record in the topology.
	DeleteCellInfo(context.Context, *connect.Request[v16.DeleteCellInfoRequest]) (*connect.Response[v16.DeleteCellInfoResponse], error)
	// DeleteCellsAlias deletes the CellsAlias for the provided alias.
	DeleteCellsAlias(context.Context, *connect.Request[v16.DeleteCellsAliasRequest]) (*connect.Response[v16.DeleteCellsAliasResponse], error)
	// DeleteKeyspace deletes the specified keyspace from the topology. In
	// recursive mode, it also recursively deletes all shards in the keyspace.
	// Otherwise, the keyspace must be empty (have no shards), or DeleteKeyspace
	// returns an error.
	DeleteKeyspace(context.Context, *connect.Request[v16.DeleteKeyspaceRequest]) (*connect.Response[v16.DeleteKeyspaceResponse], error)
	// DeleteShards deletes the specified shards from the topology. In recursive
	// mode, it also deletes all tablets belonging to the shard. Otherwise, the
	// shard must be empty (have no tablets) or DeleteShards returns an error for
	// that shard.
	DeleteShards(context.Context, *connect.Request[v16.DeleteShardsRequest]) (*connect.Response[v16.DeleteShardsResponse], error)
	// DeleteSrvVSchema deletes the SrvVSchema object in the specified cell.
	DeleteSrvVSchema(context.Context, *connect.Request[v16.DeleteSrvVSchemaRequest]) (*connect.Response[v16.DeleteSrvVSchemaResponse], error)
	// DeleteTablets deletes one or more tablets from the topology.
	DeleteTablets(context.Context, *connect.Request[v16.DeleteTabletsRequest]) (*connect.Response[v16.DeleteTabletsResponse], error)
	// EmergencyReparentShard reparents the shard to the new primary. It assumes
	// the old primary is dead or otherwise not responding.
	EmergencyReparentShard(context.Context, *connect.Request[v16.EmergencyReparentShardRequest]) (*connect.Response[v16.EmergencyReparentShardResponse], error)
	// ExecuteFetchAsApp executes a SQL query on the remote tablet as the App user.
	ExecuteFetchAsApp(context.Context, *connect.Request[v16.ExecuteFetchAsAppRequest]) (*connect.Response[v16.ExecuteFetchAsAppResponse], error)
	// ExecuteFetchAsDBA executes a SQL query on the remote tablet as the DBA user.
	ExecuteFetchAsDBA(context.Context, *connect.Request[v16.ExecuteFetchAsDBARequest]) (*connect.Response[v16.ExecuteFetchAsDBAResponse], error)
	// ExecuteHook runs the hook on the tablet.
	ExecuteHook(context.Context, *connect.Request[v16.ExecuteHookRequest]) (*connect.Response[v16.ExecuteHookResponse], error)
	// FindAllShardsInKeyspace returns a map of shard names to shard references
	// for a given keyspace.
	FindAllShardsInKeyspace(context.Context, *connect.Request[v16.FindAllShardsInKeyspaceRequest]) (*connect.Response[v16.FindAllShardsInKeyspaceResponse], error)
	// GetBackups returns all the backups for a shard.
	GetBackups(context.Context, *connect.Request[v16.GetBackupsRequest]) (*connect.Response[v16.GetBackupsResponse], error)
	// GetCellInfo returns the information for a cell.
	GetCellInfo(context.Context, *connect.Request[v16.GetCellInfoRequest]) (*connect.Response[v16.GetCellInfoResponse], error)
	// GetCellInfoNames returns all the cells for which we have a CellInfo object,
	// meaning we have a topology service registered.
	GetCellInfoNames(context.Context, *connect.Request[v16.GetCellInfoNamesRequest]) (*connect.Response[v16.GetCellInfoNamesResponse], error)
	// GetCellsAliases returns a mapping of cell alias to cells identified by that
	// alias.
	GetCellsAliases(context.Context, *connect.Request[v16.GetCellsAliasesRequest]) (*connect.Response[v16.GetCellsAliasesResponse], error)
	// GetFullStatus returns the full status of MySQL including the replication information, semi-sync information, GTID information among others
	GetFullStatus(context.Context, *connect.Request[v16.GetFullStatusRequest]) (*connect.Response[v16.GetFullStatusResponse], error)
	// GetKeyspace reads the given keyspace from the topo and returns it.
	GetKeyspace(context.Context, *connect.Request[v16.GetKeyspaceRequest]) (*connect.Response[v16.GetKeyspaceResponse], error)
	// GetKeyspaces returns the keyspace struct of all keyspaces in the topo.
	GetKeyspaces(context.Context, *connect.Request[v16.GetKeyspacesRequest]) (*connect.Response[v16.GetKeyspacesResponse], error)
	// GetPermissions returns the permissions set on the remote tablet.
	GetPermissions(context.Context, *connect.Request[v16.GetPermissionsRequest]) (*connect.Response[v16.GetPermissionsResponse], error)
	// GetRoutingRules returns the VSchema routing rules.
	GetRoutingRules(context.Context, *connect.Request[v16.GetRoutingRulesRequest]) (*connect.Response[v16.GetRoutingRulesResponse], error)
	// GetSchema returns the schema for a tablet, or just the schema for the
	// specified tables in that tablet.
	GetSchema(context.Context, *connect.Request[v16.GetSchemaRequest]) (*connect.Response[v16.GetSchemaResponse], error)
	// GetShard returns information about a shard in the topology.
	GetShard(context.Context, *connect.Request[v16.GetShardRequest]) (*connect.Response[v16.GetShardResponse], error)
	// GetShardRoutingRules returns the VSchema shard routing rules.
	GetShardRoutingRules(context.Context, *connect.Request[v16.GetShardRoutingRulesRequest]) (*connect.Response[v16.GetShardRoutingRulesResponse], error)
	// GetSrvKeyspaceNames returns a mapping of cell name to the keyspaces served
	// in that cell.
	GetSrvKeyspaceNames(context.Context, *connect.Request[v16.GetSrvKeyspaceNamesRequest]) (*connect.Response[v16.GetSrvKeyspaceNamesResponse], error)
	// GetSrvKeyspaces returns the SrvKeyspaces for a keyspace in one or more
	// cells.
	GetSrvKeyspaces(context.Context, *connect.Request[v16.GetSrvKeyspacesRequest]) (*connect.Response[v16.GetSrvKeyspacesResponse], error)
	// UpdateThrottlerConfig updates the tablet throttler configuration
	UpdateThrottlerConfig(context.Context, *connect.Request[v16.UpdateThrottlerConfigRequest]) (*connect.Response[v16.UpdateThrottlerConfigResponse], error)
	// GetSrvVSchema returns the SrvVSchema for a cell.
	GetSrvVSchema(context.Context, *connect.Request[v16.GetSrvVSchemaRequest]) (*connect.Response[v16.GetSrvVSchemaResponse], error)
	// GetSrvVSchemas returns a mapping from cell name to SrvVSchema for all cells,
	// optionally filtered by cell name.
	GetSrvVSchemas(context.Context, *connect.Request[v16.GetSrvVSchemasRequest]) (*connect.Response[v16.GetSrvVSchemasResponse], error)
	// GetTablet returns information about a tablet.
	GetTablet(context.Context, *connect.Request[v16.GetTabletRequest]) (*connect.Response[v16.GetTabletResponse], error)
	// GetTablets returns tablets, optionally filtered by keyspace and shard.
	GetTablets(context.Context, *connect.Request[v16.GetTabletsRequest]) (*connect.Response[v16.GetTabletsResponse], error)
	// GetTopologyPath returns the topology cell at a given path.
	GetTopologyPath(context.Context, *connect.Request[v16.GetTopologyPathRequest]) (*connect.Response[v16.GetTopologyPathResponse], error)
	// GetVersion returns the version of a tablet from its debug vars.
	GetVersion(context.Context, *connect.Request[v16.GetVersionRequest]) (*connect.Response[v16.GetVersionResponse], error)
	// GetVSchema returns the vschema for a keyspace.
	GetVSchema(context.Context, *connect.Request[v16.GetVSchemaRequest]) (*connect.Response[v16.GetVSchemaResponse], error)
	// GetWorkflows returns a list of workflows for the given keyspace.
	GetWorkflows(context.Context, *connect.Request[v16.GetWorkflowsRequest]) (*connect.Response[v16.GetWorkflowsResponse], error)
	// InitShardPrimary sets the initial primary for a shard. Will make all other
	// tablets in the shard replicas of the provided primary.
	//
	// WARNING: This could cause data loss on an already replicating shard.
	// PlannedReparentShard or EmergencyReparentShard should be used in those
	// cases instead.
	InitShardPrimary(context.Context, *connect.Request[v16.InitShardPrimaryRequest]) (*connect.Response[v16.InitShardPrimaryResponse], error)
	// PingTablet checks that the specified tablet is awake and responding to RPCs.
	// This command can be blocked by other in-flight operations.
	PingTablet(context.Context, *connect.Request[v16.PingTabletRequest]) (*connect.Response[v16.PingTabletResponse], error)
	// PlannedReparentShard reparents the shard to the new primary, or away from
	// an old primary. Both the old and new primaries need to be reachable and
	// running.
	//
	// **NOTE**: The vtctld will not consider any replicas outside the cell the
	// current shard primary is in for promotion unless NewPrimary is explicitly
	// provided in the request.
	PlannedReparentShard(context.Context, *connect.Request[v16.PlannedReparentShardRequest]) (*connect.Response[v16.PlannedReparentShardResponse], error)
	// RebuildKeyspaceGraph rebuilds the serving data for a keyspace.
	//
	// This may trigger an update to all connected clients.
	RebuildKeyspaceGraph(context.Context, *connect.Request[v16.RebuildKeyspaceGraphRequest]) (*connect.Response[v16.RebuildKeyspaceGraphResponse], error)
	// RebuildVSchemaGraph rebuilds the per-cell SrvVSchema from the global
	// VSchema objects in the provided cells (or all cells in the topo none
	// provided).
	RebuildVSchemaGraph(context.Context, *connect.Request[v16.RebuildVSchemaGraphRequest]) (*connect.Response[v16.RebuildVSchemaGraphResponse], error)
	// RefreshState reloads the tablet record on the specified tablet.
	RefreshState(context.Context, *connect.Request[v16.RefreshStateRequest]) (*connect.Response[v16.RefreshStateResponse], error)
	// RefreshStateByShard calls RefreshState on all the tablets in the given shard.
	RefreshStateByShard(context.Context, *connect.Request[v16.RefreshStateByShardRequest]) (*connect.Response[v16.RefreshStateByShardResponse], error)
	// ReloadSchema instructs the remote tablet to reload its schema.
	ReloadSchema(context.Context, *connect.Request[v16.ReloadSchemaRequest]) (*connect.Response[v16.ReloadSchemaResponse], error)
	// ReloadSchemaKeyspace reloads the schema on all tablets in a keyspace.
	ReloadSchemaKeyspace(context.Context, *connect.Request[v16.ReloadSchemaKeyspaceRequest]) (*connect.Response[v16.ReloadSchemaKeyspaceResponse], error)
	// ReloadSchemaShard reloads the schema on all tablets in a shard.
	//
	// In general, we don't always expect all replicas to be ready to reload, and
	// the periodic schema reload makes them self-healing anyway. So, we do this
	// on a best-effort basis, and log warnings for any tablets that fail to
	// reload within the context deadline.
	ReloadSchemaShard(context.Context, *connect.Request[v16.ReloadSchemaShardRequest]) (*connect.Response[v16.ReloadSchemaShardResponse], error)
	// RemoveBackup removes a backup from the BackupStorage used by vtctld.
	RemoveBackup(context.Context, *connect.Request[v16.RemoveBackupRequest]) (*connect.Response[v16.RemoveBackupResponse], error)
	// RemoveKeyspaceCell removes the specified cell from the Cells list for all
	// shards in the specified keyspace (by calling RemoveShardCell on every
	// shard). It also removes the SrvKeyspace for that keyspace in that cell.
	RemoveKeyspaceCell(context.Context, *connect.Request[v16.RemoveKeyspaceCellRequest]) (*connect.Response[v16.RemoveKeyspaceCellResponse], error)
	// RemoveShardCell removes the specified cell from the specified shard's Cells
	// list.
	RemoveShardCell(context.Context, *connect.Request[v16.RemoveShardCellRequest]) (*connect.Response[v16.RemoveShardCellResponse], error)
	// ReparentTablet reparents a tablet to the current primary in the shard. This
	// only works if the current replica position matches the last known reparent
	// action.
	ReparentTablet(context.Context, *connect.Request[v16.ReparentTabletRequest]) (*connect.Response[v16.ReparentTabletResponse], error)
	// RestoreFromBackup stops mysqld for the given tablet and restores a backup.
	RestoreFromBackup(context.Context, *connect.Request[v16.RestoreFromBackupRequest]) (*connect.ServerStreamForClient[v16.RestoreFromBackupResponse], error)
	// RunHealthCheck runs a healthcheck on the remote tablet.
	RunHealthCheck(context.Context, *connect.Request[v16.RunHealthCheckRequest]) (*connect.Response[v16.RunHealthCheckResponse], error)
	// SetKeyspaceDurabilityPolicy updates the DurabilityPolicy for a keyspace.
	SetKeyspaceDurabilityPolicy(context.Context, *connect.Request[v16.SetKeyspaceDurabilityPolicyRequest]) (*connect.Response[v16.SetKeyspaceDurabilityPolicyResponse], error)
	// SetShardIsPrimaryServing adds or removes a shard from serving.
	//
	// This is meant as an emergency function. It does not rebuild any serving
	// graph (i.e. it does not run RebuildKeyspaceGraph).
	SetShardIsPrimaryServing(context.Context, *connect.Request[v16.SetShardIsPrimaryServingRequest]) (*connect.Response[v16.SetShardIsPrimaryServingResponse], error)
	// SetShardTabletControl updates the TabletControl topo record for a shard and
	// tablet type.
	//
	// This should only be used for an emergency fix, or after a finished
	// Reshard. See the documentation on SetShardTabletControlRequest for more
	// information about the different update modes.
	SetShardTabletControl(context.Context, *connect.Request[v16.SetShardTabletControlRequest]) (*connect.Response[v16.SetShardTabletControlResponse], error)
	// SetWritable sets a tablet as read-write (writable=true) or read-only (writable=false).
	SetWritable(context.Context, *connect.Request[v16.SetWritableRequest]) (*connect.Response[v16.SetWritableResponse], error)
	// ShardReplicationAdd adds an entry to a topodata.ShardReplication object.
	//
	// It is a low-level function and should generally not be called.
	ShardReplicationAdd(context.Context, *connect.Request[v16.ShardReplicationAddRequest]) (*connect.Response[v16.ShardReplicationAddResponse], error)
	// ShardReplicationFix walks the replication graph for a shard in a cell and
	// attempts to fix the first problem encountered, returning information about
	// the problem fixed, if any.
	ShardReplicationFix(context.Context, *connect.Request[v16.ShardReplicationFixRequest]) (*connect.Response[v16.ShardReplicationFixResponse], error)
	// ShardReplicationPositions returns the replication position of each tablet
	// in a shard. This RPC makes a best-effort to return partial results. For
	// example, if one tablet in the shard graph is unreachable, then
	// ShardReplicationPositions will return non-error, and include valid results
	// for the reachable tablets.
	ShardReplicationPositions(context.Context, *connect.Request[v16.ShardReplicationPositionsRequest]) (*connect.Response[v16.ShardReplicationPositionsResponse], error)
	// ShardReplicationRemove removes an entry from a topodata.ShardReplication
	// object.
	//
	// It is a low-level function and should generally not be called.
	ShardReplicationRemove(context.Context, *connect.Request[v16.ShardReplicationRemoveRequest]) (*connect.Response[v16.ShardReplicationRemoveResponse], error)
	// SleepTablet blocks the aciton queue on the specified tablet for the
	// specified duration.
	//
	// This is typically used for testing.
	SleepTablet(context.Context, *connect.Request[v16.SleepTabletRequest]) (*connect.Response[v16.SleepTabletResponse], error)
	// SourceShardAdd adds the SourceShard record with the provided index. This
	// should be used only as an emergency function.
	//
	// It does not call RefreshState for the shard primary.
	SourceShardAdd(context.Context, *connect.Request[v16.SourceShardAddRequest]) (*connect.Response[v16.SourceShardAddResponse], error)
	// SourceShardDelete deletes the SourceShard record with the provided index.
	// This should be used only as an emergency cleanup function.
	//
	// It does not call RefreshState for the shard primary.
	SourceShardDelete(context.Context, *connect.Request[v16.SourceShardDeleteRequest]) (*connect.Response[v16.SourceShardDeleteResponse], error)
	// StartReplication starts replication on the specified tablet.
	StartReplication(context.Context, *connect.Request[v16.StartReplicationRequest]) (*connect.Response[v16.StartReplicationResponse], error)
	// StopReplication stops replication on the specified tablet.
	StopReplication(context.Context, *connect.Request[v16.StopReplicationRequest]) (*connect.Response[v16.StopReplicationResponse], error)
	// TabletExternallyReparented changes metadata in the topology server to
	// acknowledge a shard primary change performed by an external tool (e.g.
	// orchestrator).
	//
	// See the Reparenting guide for more information:
	// https://io/docs/user-guides/configuration-advanced/reparenting/#external-reparenting.Context, *connect.Request[v16.TabletExternallyReparentedRequest]) (*connect.Response[v16.TabletExternallyReparentedResponse], error)
	// UpdateCellInfo updates the content of a CellInfo with the provided
	// parameters. Empty values are ignored. If the cell does not exist, the
	// CellInfo will be created.
	UpdateCellInfo(context.Context, *connect.Request[v16.UpdateCellInfoRequest]) (*connect.Response[v16.UpdateCellInfoResponse], error)
	// UpdateCellsAlias updates the content of a CellsAlias with the provided
	// parameters. Empty values are ignored. If the alias does not exist, the
	// CellsAlias will be created.
	UpdateCellsAlias(context.Context, *connect.Request[v16.UpdateCellsAliasRequest]) (*connect.Response[v16.UpdateCellsAliasResponse], error)
	// Validate validates that all nodes from the global replication graph are
	// reachable, and that all tablets in discoverable cells are consistent.
	Validate(context.Context, *connect.Request[v16.ValidateRequest]) (*connect.Response[v16.ValidateResponse], error)
	// ValidateKeyspace validates that all nodes reachable from the specified
	// keyspace are consistent.
	ValidateKeyspace(context.Context, *connect.Request[v16.ValidateKeyspaceRequest]) (*connect.Response[v16.ValidateKeyspaceResponse], error)
	// ValidateSchemaKeyspace validates that the schema on the primary tablet for shard 0 matches the schema on all of the other tablets in the keyspace.
	ValidateSchemaKeyspace(context.Context, *connect.Request[v16.ValidateSchemaKeyspaceRequest]) (*connect.Response[v16.ValidateSchemaKeyspaceResponse], error)
	// ValidateShard validates that all nodes reachable from the specified shard
	// are consistent.
	ValidateShard(context.Context, *connect.Request[v16.ValidateShardRequest]) (*connect.Response[v16.ValidateShardResponse], error)
	// ValidateVersionKeyspace validates that the version on the primary of shard 0 matches all of the other tablets in the keyspace.
	ValidateVersionKeyspace(context.Context, *connect.Request[v16.ValidateVersionKeyspaceRequest]) (*connect.Response[v16.ValidateVersionKeyspaceResponse], error)
	// ValidateVersionShard validates that the version on the primary matches all of the replicas.
	ValidateVersionShard(context.Context, *connect.Request[v16.ValidateVersionShardRequest]) (*connect.Response[v16.ValidateVersionShardResponse], error)
	// ValidateVSchema compares the schema of each primary tablet in "keyspace/shards..." to the vschema and errs if there are differences.
	ValidateVSchema(context.Context, *connect.Request[v16.ValidateVSchemaRequest]) (*connect.Response[v16.ValidateVSchemaResponse], error)
}

VtctldClient is a client for the vtctlservice.Vtctld service.

func NewVtctldClient

func NewVtctldClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) VtctldClient

NewVtctldClient constructs a client for the vtctlservice.Vtctld service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type VtctldHandler

type VtctldHandler interface {
	// AddCellInfo registers a local topology service in a new cell by creating
	// the CellInfo with the provided parameters.
	AddCellInfo(context.Context, *connect.Request[v16.AddCellInfoRequest]) (*connect.Response[v16.AddCellInfoResponse], error)
	// AddCellsAlias defines a group of cells that can be referenced by a single
	// name (the alias).
	//
	// When routing query traffic, replica/rdonly traffic can be routed across
	// cells within the group (alias). Only primary traffic can be routed across
	// cells not in the same group (alias).
	AddCellsAlias(context.Context, *connect.Request[v16.AddCellsAliasRequest]) (*connect.Response[v16.AddCellsAliasResponse], error)
	// ApplyRoutingRules applies the VSchema routing rules.
	ApplyRoutingRules(context.Context, *connect.Request[v16.ApplyRoutingRulesRequest]) (*connect.Response[v16.ApplyRoutingRulesResponse], error)
	// ApplySchema applies a schema to a keyspace.
	ApplySchema(context.Context, *connect.Request[v16.ApplySchemaRequest]) (*connect.Response[v16.ApplySchemaResponse], error)
	// ApplyShardRoutingRules applies the VSchema shard routing rules.
	ApplyShardRoutingRules(context.Context, *connect.Request[v16.ApplyShardRoutingRulesRequest]) (*connect.Response[v16.ApplyShardRoutingRulesResponse], error)
	// ApplyVSchema applies a vschema to a keyspace.
	ApplyVSchema(context.Context, *connect.Request[v16.ApplyVSchemaRequest]) (*connect.Response[v16.ApplyVSchemaResponse], error)
	// Backup uses the BackupEngine and BackupStorage services on the specified
	// tablet to create and store a new backup.
	Backup(context.Context, *connect.Request[v16.BackupRequest], *connect.ServerStream[v16.BackupResponse]) error
	// BackupShard chooses a tablet in the shard and uses it to create a backup.
	BackupShard(context.Context, *connect.Request[v16.BackupShardRequest], *connect.ServerStream[v16.BackupResponse]) error
	// ChangeTabletType changes the db type for the specified tablet, if possible.
	// This is used primarily to arrange replicas, and it will not convert a
	// primary. For that, use InitShardPrimary.
	//
	// NOTE: This command automatically updates the serving graph.
	ChangeTabletType(context.Context, *connect.Request[v16.ChangeTabletTypeRequest]) (*connect.Response[v16.ChangeTabletTypeResponse], error)
	// CreateKeyspace creates the specified keyspace in the topology. For a
	// SNAPSHOT keyspace, the request must specify the name of a base keyspace,
	// as well as a snapshot time.
	CreateKeyspace(context.Context, *connect.Request[v16.CreateKeyspaceRequest]) (*connect.Response[v16.CreateKeyspaceResponse], error)
	// CreateShard creates the specified shard in the topology.
	CreateShard(context.Context, *connect.Request[v16.CreateShardRequest]) (*connect.Response[v16.CreateShardResponse], error)
	// DeleteCellInfo deletes the CellInfo for the provided cell. The cell cannot
	// be referenced by any Shard record in the topology.
	DeleteCellInfo(context.Context, *connect.Request[v16.DeleteCellInfoRequest]) (*connect.Response[v16.DeleteCellInfoResponse], error)
	// DeleteCellsAlias deletes the CellsAlias for the provided alias.
	DeleteCellsAlias(context.Context, *connect.Request[v16.DeleteCellsAliasRequest]) (*connect.Response[v16.DeleteCellsAliasResponse], error)
	// DeleteKeyspace deletes the specified keyspace from the topology. In
	// recursive mode, it also recursively deletes all shards in the keyspace.
	// Otherwise, the keyspace must be empty (have no shards), or DeleteKeyspace
	// returns an error.
	DeleteKeyspace(context.Context, *connect.Request[v16.DeleteKeyspaceRequest]) (*connect.Response[v16.DeleteKeyspaceResponse], error)
	// DeleteShards deletes the specified shards from the topology. In recursive
	// mode, it also deletes all tablets belonging to the shard. Otherwise, the
	// shard must be empty (have no tablets) or DeleteShards returns an error for
	// that shard.
	DeleteShards(context.Context, *connect.Request[v16.DeleteShardsRequest]) (*connect.Response[v16.DeleteShardsResponse], error)
	// DeleteSrvVSchema deletes the SrvVSchema object in the specified cell.
	DeleteSrvVSchema(context.Context, *connect.Request[v16.DeleteSrvVSchemaRequest]) (*connect.Response[v16.DeleteSrvVSchemaResponse], error)
	// DeleteTablets deletes one or more tablets from the topology.
	DeleteTablets(context.Context, *connect.Request[v16.DeleteTabletsRequest]) (*connect.Response[v16.DeleteTabletsResponse], error)
	// EmergencyReparentShard reparents the shard to the new primary. It assumes
	// the old primary is dead or otherwise not responding.
	EmergencyReparentShard(context.Context, *connect.Request[v16.EmergencyReparentShardRequest]) (*connect.Response[v16.EmergencyReparentShardResponse], error)
	// ExecuteFetchAsApp executes a SQL query on the remote tablet as the App user.
	ExecuteFetchAsApp(context.Context, *connect.Request[v16.ExecuteFetchAsAppRequest]) (*connect.Response[v16.ExecuteFetchAsAppResponse], error)
	// ExecuteFetchAsDBA executes a SQL query on the remote tablet as the DBA user.
	ExecuteFetchAsDBA(context.Context, *connect.Request[v16.ExecuteFetchAsDBARequest]) (*connect.Response[v16.ExecuteFetchAsDBAResponse], error)
	// ExecuteHook runs the hook on the tablet.
	ExecuteHook(context.Context, *connect.Request[v16.ExecuteHookRequest]) (*connect.Response[v16.ExecuteHookResponse], error)
	// FindAllShardsInKeyspace returns a map of shard names to shard references
	// for a given keyspace.
	FindAllShardsInKeyspace(context.Context, *connect.Request[v16.FindAllShardsInKeyspaceRequest]) (*connect.Response[v16.FindAllShardsInKeyspaceResponse], error)
	// GetBackups returns all the backups for a shard.
	GetBackups(context.Context, *connect.Request[v16.GetBackupsRequest]) (*connect.Response[v16.GetBackupsResponse], error)
	// GetCellInfo returns the information for a cell.
	GetCellInfo(context.Context, *connect.Request[v16.GetCellInfoRequest]) (*connect.Response[v16.GetCellInfoResponse], error)
	// GetCellInfoNames returns all the cells for which we have a CellInfo object,
	// meaning we have a topology service registered.
	GetCellInfoNames(context.Context, *connect.Request[v16.GetCellInfoNamesRequest]) (*connect.Response[v16.GetCellInfoNamesResponse], error)
	// GetCellsAliases returns a mapping of cell alias to cells identified by that
	// alias.
	GetCellsAliases(context.Context, *connect.Request[v16.GetCellsAliasesRequest]) (*connect.Response[v16.GetCellsAliasesResponse], error)
	// GetFullStatus returns the full status of MySQL including the replication information, semi-sync information, GTID information among others
	GetFullStatus(context.Context, *connect.Request[v16.GetFullStatusRequest]) (*connect.Response[v16.GetFullStatusResponse], error)
	// GetKeyspace reads the given keyspace from the topo and returns it.
	GetKeyspace(context.Context, *connect.Request[v16.GetKeyspaceRequest]) (*connect.Response[v16.GetKeyspaceResponse], error)
	// GetKeyspaces returns the keyspace struct of all keyspaces in the topo.
	GetKeyspaces(context.Context, *connect.Request[v16.GetKeyspacesRequest]) (*connect.Response[v16.GetKeyspacesResponse], error)
	// GetPermissions returns the permissions set on the remote tablet.
	GetPermissions(context.Context, *connect.Request[v16.GetPermissionsRequest]) (*connect.Response[v16.GetPermissionsResponse], error)
	// GetRoutingRules returns the VSchema routing rules.
	GetRoutingRules(context.Context, *connect.Request[v16.GetRoutingRulesRequest]) (*connect.Response[v16.GetRoutingRulesResponse], error)
	// GetSchema returns the schema for a tablet, or just the schema for the
	// specified tables in that tablet.
	GetSchema(context.Context, *connect.Request[v16.GetSchemaRequest]) (*connect.Response[v16.GetSchemaResponse], error)
	// GetShard returns information about a shard in the topology.
	GetShard(context.Context, *connect.Request[v16.GetShardRequest]) (*connect.Response[v16.GetShardResponse], error)
	// GetShardRoutingRules returns the VSchema shard routing rules.
	GetShardRoutingRules(context.Context, *connect.Request[v16.GetShardRoutingRulesRequest]) (*connect.Response[v16.GetShardRoutingRulesResponse], error)
	// GetSrvKeyspaceNames returns a mapping of cell name to the keyspaces served
	// in that cell.
	GetSrvKeyspaceNames(context.Context, *connect.Request[v16.GetSrvKeyspaceNamesRequest]) (*connect.Response[v16.GetSrvKeyspaceNamesResponse], error)
	// GetSrvKeyspaces returns the SrvKeyspaces for a keyspace in one or more
	// cells.
	GetSrvKeyspaces(context.Context, *connect.Request[v16.GetSrvKeyspacesRequest]) (*connect.Response[v16.GetSrvKeyspacesResponse], error)
	// UpdateThrottlerConfig updates the tablet throttler configuration
	UpdateThrottlerConfig(context.Context, *connect.Request[v16.UpdateThrottlerConfigRequest]) (*connect.Response[v16.UpdateThrottlerConfigResponse], error)
	// GetSrvVSchema returns the SrvVSchema for a cell.
	GetSrvVSchema(context.Context, *connect.Request[v16.GetSrvVSchemaRequest]) (*connect.Response[v16.GetSrvVSchemaResponse], error)
	// GetSrvVSchemas returns a mapping from cell name to SrvVSchema for all cells,
	// optionally filtered by cell name.
	GetSrvVSchemas(context.Context, *connect.Request[v16.GetSrvVSchemasRequest]) (*connect.Response[v16.GetSrvVSchemasResponse], error)
	// GetTablet returns information about a tablet.
	GetTablet(context.Context, *connect.Request[v16.GetTabletRequest]) (*connect.Response[v16.GetTabletResponse], error)
	// GetTablets returns tablets, optionally filtered by keyspace and shard.
	GetTablets(context.Context, *connect.Request[v16.GetTabletsRequest]) (*connect.Response[v16.GetTabletsResponse], error)
	// GetTopologyPath returns the topology cell at a given path.
	GetTopologyPath(context.Context, *connect.Request[v16.GetTopologyPathRequest]) (*connect.Response[v16.GetTopologyPathResponse], error)
	// GetVersion returns the version of a tablet from its debug vars.
	GetVersion(context.Context, *connect.Request[v16.GetVersionRequest]) (*connect.Response[v16.GetVersionResponse], error)
	// GetVSchema returns the vschema for a keyspace.
	GetVSchema(context.Context, *connect.Request[v16.GetVSchemaRequest]) (*connect.Response[v16.GetVSchemaResponse], error)
	// GetWorkflows returns a list of workflows for the given keyspace.
	GetWorkflows(context.Context, *connect.Request[v16.GetWorkflowsRequest]) (*connect.Response[v16.GetWorkflowsResponse], error)
	// InitShardPrimary sets the initial primary for a shard. Will make all other
	// tablets in the shard replicas of the provided primary.
	//
	// WARNING: This could cause data loss on an already replicating shard.
	// PlannedReparentShard or EmergencyReparentShard should be used in those
	// cases instead.
	InitShardPrimary(context.Context, *connect.Request[v16.InitShardPrimaryRequest]) (*connect.Response[v16.InitShardPrimaryResponse], error)
	// PingTablet checks that the specified tablet is awake and responding to RPCs.
	// This command can be blocked by other in-flight operations.
	PingTablet(context.Context, *connect.Request[v16.PingTabletRequest]) (*connect.Response[v16.PingTabletResponse], error)
	// PlannedReparentShard reparents the shard to the new primary, or away from
	// an old primary. Both the old and new primaries need to be reachable and
	// running.
	//
	// **NOTE**: The vtctld will not consider any replicas outside the cell the
	// current shard primary is in for promotion unless NewPrimary is explicitly
	// provided in the request.
	PlannedReparentShard(context.Context, *connect.Request[v16.PlannedReparentShardRequest]) (*connect.Response[v16.PlannedReparentShardResponse], error)
	// RebuildKeyspaceGraph rebuilds the serving data for a keyspace.
	//
	// This may trigger an update to all connected clients.
	RebuildKeyspaceGraph(context.Context, *connect.Request[v16.RebuildKeyspaceGraphRequest]) (*connect.Response[v16.RebuildKeyspaceGraphResponse], error)
	// RebuildVSchemaGraph rebuilds the per-cell SrvVSchema from the global
	// VSchema objects in the provided cells (or all cells in the topo none
	// provided).
	RebuildVSchemaGraph(context.Context, *connect.Request[v16.RebuildVSchemaGraphRequest]) (*connect.Response[v16.RebuildVSchemaGraphResponse], error)
	// RefreshState reloads the tablet record on the specified tablet.
	RefreshState(context.Context, *connect.Request[v16.RefreshStateRequest]) (*connect.Response[v16.RefreshStateResponse], error)
	// RefreshStateByShard calls RefreshState on all the tablets in the given shard.
	RefreshStateByShard(context.Context, *connect.Request[v16.RefreshStateByShardRequest]) (*connect.Response[v16.RefreshStateByShardResponse], error)
	// ReloadSchema instructs the remote tablet to reload its schema.
	ReloadSchema(context.Context, *connect.Request[v16.ReloadSchemaRequest]) (*connect.Response[v16.ReloadSchemaResponse], error)
	// ReloadSchemaKeyspace reloads the schema on all tablets in a keyspace.
	ReloadSchemaKeyspace(context.Context, *connect.Request[v16.ReloadSchemaKeyspaceRequest]) (*connect.Response[v16.ReloadSchemaKeyspaceResponse], error)
	// ReloadSchemaShard reloads the schema on all tablets in a shard.
	//
	// In general, we don't always expect all replicas to be ready to reload, and
	// the periodic schema reload makes them self-healing anyway. So, we do this
	// on a best-effort basis, and log warnings for any tablets that fail to
	// reload within the context deadline.
	ReloadSchemaShard(context.Context, *connect.Request[v16.ReloadSchemaShardRequest]) (*connect.Response[v16.ReloadSchemaShardResponse], error)
	// RemoveBackup removes a backup from the BackupStorage used by vtctld.
	RemoveBackup(context.Context, *connect.Request[v16.RemoveBackupRequest]) (*connect.Response[v16.RemoveBackupResponse], error)
	// RemoveKeyspaceCell removes the specified cell from the Cells list for all
	// shards in the specified keyspace (by calling RemoveShardCell on every
	// shard). It also removes the SrvKeyspace for that keyspace in that cell.
	RemoveKeyspaceCell(context.Context, *connect.Request[v16.RemoveKeyspaceCellRequest]) (*connect.Response[v16.RemoveKeyspaceCellResponse], error)
	// RemoveShardCell removes the specified cell from the specified shard's Cells
	// list.
	RemoveShardCell(context.Context, *connect.Request[v16.RemoveShardCellRequest]) (*connect.Response[v16.RemoveShardCellResponse], error)
	// ReparentTablet reparents a tablet to the current primary in the shard. This
	// only works if the current replica position matches the last known reparent
	// action.
	ReparentTablet(context.Context, *connect.Request[v16.ReparentTabletRequest]) (*connect.Response[v16.ReparentTabletResponse], error)
	// RestoreFromBackup stops mysqld for the given tablet and restores a backup.
	RestoreFromBackup(context.Context, *connect.Request[v16.RestoreFromBackupRequest], *connect.ServerStream[v16.RestoreFromBackupResponse]) error
	// RunHealthCheck runs a healthcheck on the remote tablet.
	RunHealthCheck(context.Context, *connect.Request[v16.RunHealthCheckRequest]) (*connect.Response[v16.RunHealthCheckResponse], error)
	// SetKeyspaceDurabilityPolicy updates the DurabilityPolicy for a keyspace.
	SetKeyspaceDurabilityPolicy(context.Context, *connect.Request[v16.SetKeyspaceDurabilityPolicyRequest]) (*connect.Response[v16.SetKeyspaceDurabilityPolicyResponse], error)
	// SetShardIsPrimaryServing adds or removes a shard from serving.
	//
	// This is meant as an emergency function. It does not rebuild any serving
	// graph (i.e. it does not run RebuildKeyspaceGraph).
	SetShardIsPrimaryServing(context.Context, *connect.Request[v16.SetShardIsPrimaryServingRequest]) (*connect.Response[v16.SetShardIsPrimaryServingResponse], error)
	// SetShardTabletControl updates the TabletControl topo record for a shard and
	// tablet type.
	//
	// This should only be used for an emergency fix, or after a finished
	// Reshard. See the documentation on SetShardTabletControlRequest for more
	// information about the different update modes.
	SetShardTabletControl(context.Context, *connect.Request[v16.SetShardTabletControlRequest]) (*connect.Response[v16.SetShardTabletControlResponse], error)
	// SetWritable sets a tablet as read-write (writable=true) or read-only (writable=false).
	SetWritable(context.Context, *connect.Request[v16.SetWritableRequest]) (*connect.Response[v16.SetWritableResponse], error)
	// ShardReplicationAdd adds an entry to a topodata.ShardReplication object.
	//
	// It is a low-level function and should generally not be called.
	ShardReplicationAdd(context.Context, *connect.Request[v16.ShardReplicationAddRequest]) (*connect.Response[v16.ShardReplicationAddResponse], error)
	// ShardReplicationFix walks the replication graph for a shard in a cell and
	// attempts to fix the first problem encountered, returning information about
	// the problem fixed, if any.
	ShardReplicationFix(context.Context, *connect.Request[v16.ShardReplicationFixRequest]) (*connect.Response[v16.ShardReplicationFixResponse], error)
	// ShardReplicationPositions returns the replication position of each tablet
	// in a shard. This RPC makes a best-effort to return partial results. For
	// example, if one tablet in the shard graph is unreachable, then
	// ShardReplicationPositions will return non-error, and include valid results
	// for the reachable tablets.
	ShardReplicationPositions(context.Context, *connect.Request[v16.ShardReplicationPositionsRequest]) (*connect.Response[v16.ShardReplicationPositionsResponse], error)
	// ShardReplicationRemove removes an entry from a topodata.ShardReplication
	// object.
	//
	// It is a low-level function and should generally not be called.
	ShardReplicationRemove(context.Context, *connect.Request[v16.ShardReplicationRemoveRequest]) (*connect.Response[v16.ShardReplicationRemoveResponse], error)
	// SleepTablet blocks the aciton queue on the specified tablet for the
	// specified duration.
	//
	// This is typically used for testing.
	SleepTablet(context.Context, *connect.Request[v16.SleepTabletRequest]) (*connect.Response[v16.SleepTabletResponse], error)
	// SourceShardAdd adds the SourceShard record with the provided index. This
	// should be used only as an emergency function.
	//
	// It does not call RefreshState for the shard primary.
	SourceShardAdd(context.Context, *connect.Request[v16.SourceShardAddRequest]) (*connect.Response[v16.SourceShardAddResponse], error)
	// SourceShardDelete deletes the SourceShard record with the provided index.
	// This should be used only as an emergency cleanup function.
	//
	// It does not call RefreshState for the shard primary.
	SourceShardDelete(context.Context, *connect.Request[v16.SourceShardDeleteRequest]) (*connect.Response[v16.SourceShardDeleteResponse], error)
	// StartReplication starts replication on the specified tablet.
	StartReplication(context.Context, *connect.Request[v16.StartReplicationRequest]) (*connect.Response[v16.StartReplicationResponse], error)
	// StopReplication stops replication on the specified tablet.
	StopReplication(context.Context, *connect.Request[v16.StopReplicationRequest]) (*connect.Response[v16.StopReplicationResponse], error)
	// TabletExternallyReparented changes metadata in the topology server to
	// acknowledge a shard primary change performed by an external tool (e.g.
	// orchestrator).
	//
	// See the Reparenting guide for more information:
	// https://io/docs/user-guides/configuration-advanced/reparenting/#external-reparenting.Context, *connect.Request[v16.TabletExternallyReparentedRequest]) (*connect.Response[v16.TabletExternallyReparentedResponse], error)
	// UpdateCellInfo updates the content of a CellInfo with the provided
	// parameters. Empty values are ignored. If the cell does not exist, the
	// CellInfo will be created.
	UpdateCellInfo(context.Context, *connect.Request[v16.UpdateCellInfoRequest]) (*connect.Response[v16.UpdateCellInfoResponse], error)
	// UpdateCellsAlias updates the content of a CellsAlias with the provided
	// parameters. Empty values are ignored. If the alias does not exist, the
	// CellsAlias will be created.
	UpdateCellsAlias(context.Context, *connect.Request[v16.UpdateCellsAliasRequest]) (*connect.Response[v16.UpdateCellsAliasResponse], error)
	// Validate validates that all nodes from the global replication graph are
	// reachable, and that all tablets in discoverable cells are consistent.
	Validate(context.Context, *connect.Request[v16.ValidateRequest]) (*connect.Response[v16.ValidateResponse], error)
	// ValidateKeyspace validates that all nodes reachable from the specified
	// keyspace are consistent.
	ValidateKeyspace(context.Context, *connect.Request[v16.ValidateKeyspaceRequest]) (*connect.Response[v16.ValidateKeyspaceResponse], error)
	// ValidateSchemaKeyspace validates that the schema on the primary tablet for shard 0 matches the schema on all of the other tablets in the keyspace.
	ValidateSchemaKeyspace(context.Context, *connect.Request[v16.ValidateSchemaKeyspaceRequest]) (*connect.Response[v16.ValidateSchemaKeyspaceResponse], error)
	// ValidateShard validates that all nodes reachable from the specified shard
	// are consistent.
	ValidateShard(context.Context, *connect.Request[v16.ValidateShardRequest]) (*connect.Response[v16.ValidateShardResponse], error)
	// ValidateVersionKeyspace validates that the version on the primary of shard 0 matches all of the other tablets in the keyspace.
	ValidateVersionKeyspace(context.Context, *connect.Request[v16.ValidateVersionKeyspaceRequest]) (*connect.Response[v16.ValidateVersionKeyspaceResponse], error)
	// ValidateVersionShard validates that the version on the primary matches all of the replicas.
	ValidateVersionShard(context.Context, *connect.Request[v16.ValidateVersionShardRequest]) (*connect.Response[v16.ValidateVersionShardResponse], error)
	// ValidateVSchema compares the schema of each primary tablet in "keyspace/shards..." to the vschema and errs if there are differences.
	ValidateVSchema(context.Context, *connect.Request[v16.ValidateVSchemaRequest]) (*connect.Response[v16.ValidateVSchemaResponse], error)
}

VtctldHandler is an implementation of the vtctlservice.Vtctld service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL