vtctlservice

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_vtctlservice_proto protoreflect.FileDescriptor
View Source
var Vtctl_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "vtctlservice.Vtctl",
	HandlerType: (*VtctlServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ExecuteVtctlCommand",
			Handler:       _Vtctl_ExecuteVtctlCommand_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "vtctlservice.proto",
}

Vtctl_ServiceDesc is the grpc.ServiceDesc for Vtctl service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Vtctld_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "vtctlservice.Vtctld",
	HandlerType: (*VtctldServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddCellInfo",
			Handler:    _Vtctld_AddCellInfo_Handler,
		},
		{
			MethodName: "AddCellsAlias",
			Handler:    _Vtctld_AddCellsAlias_Handler,
		},
		{
			MethodName: "ApplyRoutingRules",
			Handler:    _Vtctld_ApplyRoutingRules_Handler,
		},
		{
			MethodName: "ApplyVSchema",
			Handler:    _Vtctld_ApplyVSchema_Handler,
		},
		{
			MethodName: "ChangeTabletType",
			Handler:    _Vtctld_ChangeTabletType_Handler,
		},
		{
			MethodName: "CreateKeyspace",
			Handler:    _Vtctld_CreateKeyspace_Handler,
		},
		{
			MethodName: "CreateShard",
			Handler:    _Vtctld_CreateShard_Handler,
		},
		{
			MethodName: "DeleteCellInfo",
			Handler:    _Vtctld_DeleteCellInfo_Handler,
		},
		{
			MethodName: "DeleteCellsAlias",
			Handler:    _Vtctld_DeleteCellsAlias_Handler,
		},
		{
			MethodName: "DeleteKeyspace",
			Handler:    _Vtctld_DeleteKeyspace_Handler,
		},
		{
			MethodName: "DeleteShards",
			Handler:    _Vtctld_DeleteShards_Handler,
		},
		{
			MethodName: "DeleteTablets",
			Handler:    _Vtctld_DeleteTablets_Handler,
		},
		{
			MethodName: "EmergencyReparentShard",
			Handler:    _Vtctld_EmergencyReparentShard_Handler,
		},
		{
			MethodName: "FindAllShardsInKeyspace",
			Handler:    _Vtctld_FindAllShardsInKeyspace_Handler,
		},
		{
			MethodName: "GetBackups",
			Handler:    _Vtctld_GetBackups_Handler,
		},
		{
			MethodName: "GetCellInfo",
			Handler:    _Vtctld_GetCellInfo_Handler,
		},
		{
			MethodName: "GetCellInfoNames",
			Handler:    _Vtctld_GetCellInfoNames_Handler,
		},
		{
			MethodName: "GetCellsAliases",
			Handler:    _Vtctld_GetCellsAliases_Handler,
		},
		{
			MethodName: "GetKeyspace",
			Handler:    _Vtctld_GetKeyspace_Handler,
		},
		{
			MethodName: "GetKeyspaces",
			Handler:    _Vtctld_GetKeyspaces_Handler,
		},
		{
			MethodName: "GetRoutingRules",
			Handler:    _Vtctld_GetRoutingRules_Handler,
		},
		{
			MethodName: "GetSchema",
			Handler:    _Vtctld_GetSchema_Handler,
		},
		{
			MethodName: "GetShard",
			Handler:    _Vtctld_GetShard_Handler,
		},
		{
			MethodName: "GetSrvKeyspaces",
			Handler:    _Vtctld_GetSrvKeyspaces_Handler,
		},
		{
			MethodName: "GetSrvVSchema",
			Handler:    _Vtctld_GetSrvVSchema_Handler,
		},
		{
			MethodName: "GetSrvVSchemas",
			Handler:    _Vtctld_GetSrvVSchemas_Handler,
		},
		{
			MethodName: "GetTablet",
			Handler:    _Vtctld_GetTablet_Handler,
		},
		{
			MethodName: "GetTablets",
			Handler:    _Vtctld_GetTablets_Handler,
		},
		{
			MethodName: "GetVSchema",
			Handler:    _Vtctld_GetVSchema_Handler,
		},
		{
			MethodName: "GetWorkflows",
			Handler:    _Vtctld_GetWorkflows_Handler,
		},
		{
			MethodName: "InitShardPrimary",
			Handler:    _Vtctld_InitShardPrimary_Handler,
		},
		{
			MethodName: "PlannedReparentShard",
			Handler:    _Vtctld_PlannedReparentShard_Handler,
		},
		{
			MethodName: "RebuildVSchemaGraph",
			Handler:    _Vtctld_RebuildVSchemaGraph_Handler,
		},
		{
			MethodName: "RefreshState",
			Handler:    _Vtctld_RefreshState_Handler,
		},
		{
			MethodName: "RefreshStateByShard",
			Handler:    _Vtctld_RefreshStateByShard_Handler,
		},
		{
			MethodName: "RemoveKeyspaceCell",
			Handler:    _Vtctld_RemoveKeyspaceCell_Handler,
		},
		{
			MethodName: "RemoveShardCell",
			Handler:    _Vtctld_RemoveShardCell_Handler,
		},
		{
			MethodName: "ReparentTablet",
			Handler:    _Vtctld_ReparentTablet_Handler,
		},
		{
			MethodName: "ShardReplicationPositions",
			Handler:    _Vtctld_ShardReplicationPositions_Handler,
		},
		{
			MethodName: "TabletExternallyReparented",
			Handler:    _Vtctld_TabletExternallyReparented_Handler,
		},
		{
			MethodName: "UpdateCellInfo",
			Handler:    _Vtctld_UpdateCellInfo_Handler,
		},
		{
			MethodName: "UpdateCellsAlias",
			Handler:    _Vtctld_UpdateCellsAlias_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "vtctlservice.proto",
}

Vtctld_ServiceDesc is the grpc.ServiceDesc for Vtctld service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterVtctlServer

func RegisterVtctlServer(s grpc.ServiceRegistrar, srv VtctlServer)

func RegisterVtctldServer added in v0.9.0

func RegisterVtctldServer(s grpc.ServiceRegistrar, srv VtctldServer)

Types

type UnimplementedVtctlServer

type UnimplementedVtctlServer struct {
}

UnimplementedVtctlServer must be embedded to have forward compatible implementations.

type UnimplementedVtctldServer added in v0.9.0

type UnimplementedVtctldServer struct {
}

UnimplementedVtctldServer must be embedded to have forward compatible implementations.

func (UnimplementedVtctldServer) AddCellInfo added in v0.11.0

func (UnimplementedVtctldServer) AddCellsAlias added in v0.11.0

func (UnimplementedVtctldServer) ApplyRoutingRules added in v0.11.0

func (UnimplementedVtctldServer) ApplyVSchema added in v0.11.0

func (UnimplementedVtctldServer) ChangeTabletType added in v0.10.0

func (UnimplementedVtctldServer) CreateKeyspace added in v0.10.0

func (UnimplementedVtctldServer) CreateShard added in v0.10.0

func (UnimplementedVtctldServer) DeleteCellInfo added in v0.11.0

func (UnimplementedVtctldServer) DeleteCellsAlias added in v0.11.0

func (UnimplementedVtctldServer) DeleteKeyspace added in v0.10.0

func (UnimplementedVtctldServer) DeleteShards added in v0.10.0

func (UnimplementedVtctldServer) DeleteTablets added in v0.10.0

func (UnimplementedVtctldServer) EmergencyReparentShard added in v0.10.0

func (UnimplementedVtctldServer) GetBackups added in v0.10.0

func (UnimplementedVtctldServer) GetCellInfo added in v0.10.0

func (UnimplementedVtctldServer) GetCellInfoNames added in v0.10.0

func (UnimplementedVtctldServer) GetCellsAliases added in v0.10.0

func (UnimplementedVtctldServer) GetKeyspace added in v0.9.0

func (UnimplementedVtctldServer) GetKeyspaces added in v0.9.0

func (UnimplementedVtctldServer) GetRoutingRules added in v0.11.0

func (UnimplementedVtctldServer) GetSchema added in v0.10.0

func (UnimplementedVtctldServer) GetShard added in v0.10.0

func (UnimplementedVtctldServer) GetSrvKeyspaces added in v0.10.0

func (UnimplementedVtctldServer) GetSrvVSchema added in v0.10.0

func (UnimplementedVtctldServer) GetSrvVSchemas added in v0.11.0

func (UnimplementedVtctldServer) GetTablet added in v0.10.0

func (UnimplementedVtctldServer) GetTablets added in v0.10.0

func (UnimplementedVtctldServer) GetVSchema added in v0.10.0

func (UnimplementedVtctldServer) GetWorkflows added in v0.10.0

func (UnimplementedVtctldServer) InitShardPrimary added in v0.10.0

func (UnimplementedVtctldServer) PlannedReparentShard added in v0.10.0

func (UnimplementedVtctldServer) RebuildVSchemaGraph added in v0.11.0

func (UnimplementedVtctldServer) RefreshState added in v0.11.0

func (UnimplementedVtctldServer) RefreshStateByShard added in v0.11.0

func (UnimplementedVtctldServer) RemoveKeyspaceCell added in v0.10.0

func (UnimplementedVtctldServer) RemoveShardCell added in v0.10.0

func (UnimplementedVtctldServer) ReparentTablet added in v0.10.0

func (UnimplementedVtctldServer) UpdateCellInfo added in v0.11.0

func (UnimplementedVtctldServer) UpdateCellsAlias added in v0.11.0

type UnsafeVtctlServer added in v0.11.0

type UnsafeVtctlServer interface {
	// contains filtered or unexported methods
}

UnsafeVtctlServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VtctlServer will result in compilation errors.

type UnsafeVtctldServer added in v0.11.0

type UnsafeVtctldServer interface {
	// contains filtered or unexported methods
}

UnsafeVtctldServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VtctldServer will result in compilation errors.

type VtctlClient

type VtctlClient interface {
	ExecuteVtctlCommand(ctx context.Context, in *vtctldata.ExecuteVtctlCommandRequest, opts ...grpc.CallOption) (Vtctl_ExecuteVtctlCommandClient, error)
}

VtctlClient is the client API for Vtctl service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewVtctlClient

func NewVtctlClient(cc grpc.ClientConnInterface) VtctlClient

type VtctlServer

type VtctlServer interface {
	ExecuteVtctlCommand(*vtctldata.ExecuteVtctlCommandRequest, Vtctl_ExecuteVtctlCommandServer) error
	// contains filtered or unexported methods
}

VtctlServer is the server API for Vtctl service. All implementations must embed UnimplementedVtctlServer for forward compatibility

type Vtctl_ExecuteVtctlCommandClient

type Vtctl_ExecuteVtctlCommandClient interface {
	Recv() (*vtctldata.ExecuteVtctlCommandResponse, error)
	grpc.ClientStream
}

type Vtctl_ExecuteVtctlCommandServer

type Vtctl_ExecuteVtctlCommandServer interface {
	Send(*vtctldata.ExecuteVtctlCommandResponse) error
	grpc.ServerStream
}

type VtctldClient added in v0.9.0

type VtctldClient interface {
	// AddCellInfo registers a local topology service in a new cell by creating
	// the CellInfo with the provided parameters.
	AddCellInfo(ctx context.Context, in *vtctldata.AddCellInfoRequest, opts ...grpc.CallOption) (*vtctldata.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(ctx context.Context, in *vtctldata.AddCellsAliasRequest, opts ...grpc.CallOption) (*vtctldata.AddCellsAliasResponse, error)
	// ApplyRoutingRules applies the VSchema routing rules.
	ApplyRoutingRules(ctx context.Context, in *vtctldata.ApplyRoutingRulesRequest, opts ...grpc.CallOption) (*vtctldata.ApplyRoutingRulesResponse, error)
	// ApplyVSchema applies a vschema to a keyspace.
	ApplyVSchema(ctx context.Context, in *vtctldata.ApplyVSchemaRequest, opts ...grpc.CallOption) (*vtctldata.ApplyVSchemaResponse, 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(ctx context.Context, in *vtctldata.ChangeTabletTypeRequest, opts ...grpc.CallOption) (*vtctldata.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(ctx context.Context, in *vtctldata.CreateKeyspaceRequest, opts ...grpc.CallOption) (*vtctldata.CreateKeyspaceResponse, error)
	// CreateShard creates the specified shard in the topology.
	CreateShard(ctx context.Context, in *vtctldata.CreateShardRequest, opts ...grpc.CallOption) (*vtctldata.CreateShardResponse, error)
	// DeleteCellInfo deletes the CellInfo for the provided cell. The cell cannot
	// be referenced by any Shard record in the topology.
	DeleteCellInfo(ctx context.Context, in *vtctldata.DeleteCellInfoRequest, opts ...grpc.CallOption) (*vtctldata.DeleteCellInfoResponse, error)
	// DeleteCellsAlias deletes the CellsAlias for the provided alias.
	DeleteCellsAlias(ctx context.Context, in *vtctldata.DeleteCellsAliasRequest, opts ...grpc.CallOption) (*vtctldata.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(ctx context.Context, in *vtctldata.DeleteKeyspaceRequest, opts ...grpc.CallOption) (*vtctldata.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(ctx context.Context, in *vtctldata.DeleteShardsRequest, opts ...grpc.CallOption) (*vtctldata.DeleteShardsResponse, error)
	// DeleteTablets deletes one or more tablets from the topology.
	DeleteTablets(ctx context.Context, in *vtctldata.DeleteTabletsRequest, opts ...grpc.CallOption) (*vtctldata.DeleteTabletsResponse, error)
	// EmergencyReparentShard reparents the shard to the new primary. It assumes
	// the old primary is dead or otherwise not responding.
	EmergencyReparentShard(ctx context.Context, in *vtctldata.EmergencyReparentShardRequest, opts ...grpc.CallOption) (*vtctldata.EmergencyReparentShardResponse, error)
	// FindAllShardsInKeyspace returns a map of shard names to shard references
	// for a given keyspace.
	FindAllShardsInKeyspace(ctx context.Context, in *vtctldata.FindAllShardsInKeyspaceRequest, opts ...grpc.CallOption) (*vtctldata.FindAllShardsInKeyspaceResponse, error)
	// GetBackups returns all the backups for a shard.
	GetBackups(ctx context.Context, in *vtctldata.GetBackupsRequest, opts ...grpc.CallOption) (*vtctldata.GetBackupsResponse, error)
	// GetCellInfo returns the information for a cell.
	GetCellInfo(ctx context.Context, in *vtctldata.GetCellInfoRequest, opts ...grpc.CallOption) (*vtctldata.GetCellInfoResponse, error)
	// GetCellInfoNames returns all the cells for which we have a CellInfo object,
	// meaning we have a topology service registered.
	GetCellInfoNames(ctx context.Context, in *vtctldata.GetCellInfoNamesRequest, opts ...grpc.CallOption) (*vtctldata.GetCellInfoNamesResponse, error)
	// GetCellsAliases returns a mapping of cell alias to cells identified by that
	// alias.
	GetCellsAliases(ctx context.Context, in *vtctldata.GetCellsAliasesRequest, opts ...grpc.CallOption) (*vtctldata.GetCellsAliasesResponse, error)
	// GetKeyspace reads the given keyspace from the topo and returns it.
	GetKeyspace(ctx context.Context, in *vtctldata.GetKeyspaceRequest, opts ...grpc.CallOption) (*vtctldata.GetKeyspaceResponse, error)
	// GetKeyspaces returns the keyspace struct of all keyspaces in the topo.
	GetKeyspaces(ctx context.Context, in *vtctldata.GetKeyspacesRequest, opts ...grpc.CallOption) (*vtctldata.GetKeyspacesResponse, error)
	// GetRoutingRules returns the VSchema routing rules.
	GetRoutingRules(ctx context.Context, in *vtctldata.GetRoutingRulesRequest, opts ...grpc.CallOption) (*vtctldata.GetRoutingRulesResponse, error)
	// GetSchema returns the schema for a tablet, or just the schema for the
	// specified tables in that tablet.
	GetSchema(ctx context.Context, in *vtctldata.GetSchemaRequest, opts ...grpc.CallOption) (*vtctldata.GetSchemaResponse, error)
	// GetShard returns information about a shard in the topology.
	GetShard(ctx context.Context, in *vtctldata.GetShardRequest, opts ...grpc.CallOption) (*vtctldata.GetShardResponse, error)
	// GetSrvKeyspaces returns the SrvKeyspaces for a keyspace in one or more
	// cells.
	GetSrvKeyspaces(ctx context.Context, in *vtctldata.GetSrvKeyspacesRequest, opts ...grpc.CallOption) (*vtctldata.GetSrvKeyspacesResponse, error)
	// GetSrvVSchema returns the SrvVSchema for a cell.
	GetSrvVSchema(ctx context.Context, in *vtctldata.GetSrvVSchemaRequest, opts ...grpc.CallOption) (*vtctldata.GetSrvVSchemaResponse, error)
	// GetSrvVSchemas returns a mapping from cell name to SrvVSchema for all cells,
	// optionally filtered by cell name.
	GetSrvVSchemas(ctx context.Context, in *vtctldata.GetSrvVSchemasRequest, opts ...grpc.CallOption) (*vtctldata.GetSrvVSchemasResponse, error)
	// GetTablet returns information about a tablet.
	GetTablet(ctx context.Context, in *vtctldata.GetTabletRequest, opts ...grpc.CallOption) (*vtctldata.GetTabletResponse, error)
	// GetTablets returns tablets, optionally filtered by keyspace and shard.
	GetTablets(ctx context.Context, in *vtctldata.GetTabletsRequest, opts ...grpc.CallOption) (*vtctldata.GetTabletsResponse, error)
	// GetVSchema returns the vschema for a keyspace.
	GetVSchema(ctx context.Context, in *vtctldata.GetVSchemaRequest, opts ...grpc.CallOption) (*vtctldata.GetVSchemaResponse, error)
	// GetWorkflows returns a list of workflows for the given keyspace.
	GetWorkflows(ctx context.Context, in *vtctldata.GetWorkflowsRequest, opts ...grpc.CallOption) (*vtctldata.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(ctx context.Context, in *vtctldata.InitShardPrimaryRequest, opts ...grpc.CallOption) (*vtctldata.InitShardPrimaryResponse, 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(ctx context.Context, in *vtctldata.PlannedReparentShardRequest, opts ...grpc.CallOption) (*vtctldata.PlannedReparentShardResponse, 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(ctx context.Context, in *vtctldata.RebuildVSchemaGraphRequest, opts ...grpc.CallOption) (*vtctldata.RebuildVSchemaGraphResponse, error)
	// RefreshState reloads the tablet record on the specified tablet.
	RefreshState(ctx context.Context, in *vtctldata.RefreshStateRequest, opts ...grpc.CallOption) (*vtctldata.RefreshStateResponse, error)
	// RefreshStateByShard calls RefreshState on all the tablets in the given shard.
	RefreshStateByShard(ctx context.Context, in *vtctldata.RefreshStateByShardRequest, opts ...grpc.CallOption) (*vtctldata.RefreshStateByShardResponse, error)
	// RemoveKeyspaceCell removes the specified cell from the Cells list for all
	// shards in the specified keyspace, as well as from the SrvKeyspace for that
	// keyspace in that cell.
	RemoveKeyspaceCell(ctx context.Context, in *vtctldata.RemoveKeyspaceCellRequest, opts ...grpc.CallOption) (*vtctldata.RemoveKeyspaceCellResponse, error)
	// RemoveShardCell removes the specified cell from the specified shard's Cells
	// list.
	RemoveShardCell(ctx context.Context, in *vtctldata.RemoveShardCellRequest, opts ...grpc.CallOption) (*vtctldata.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(ctx context.Context, in *vtctldata.ReparentTabletRequest, opts ...grpc.CallOption) (*vtctldata.ReparentTabletResponse, 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(ctx context.Context, in *vtctldata.ShardReplicationPositionsRequest, opts ...grpc.CallOption) (*vtctldata.ShardReplicationPositionsResponse, 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://vitess.io/docs/user-guides/configuration-advanced/reparenting/#external-reparenting.
	TabletExternallyReparented(ctx context.Context, in *vtctldata.TabletExternallyReparentedRequest, opts ...grpc.CallOption) (*vtctldata.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(ctx context.Context, in *vtctldata.UpdateCellInfoRequest, opts ...grpc.CallOption) (*vtctldata.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(ctx context.Context, in *vtctldata.UpdateCellsAliasRequest, opts ...grpc.CallOption) (*vtctldata.UpdateCellsAliasResponse, error)
}

VtctldClient is the client API for Vtctld service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewVtctldClient added in v0.9.0

func NewVtctldClient(cc grpc.ClientConnInterface) VtctldClient

type VtctldServer added in v0.9.0

type VtctldServer interface {
	// AddCellInfo registers a local topology service in a new cell by creating
	// the CellInfo with the provided parameters.
	AddCellInfo(context.Context, *vtctldata.AddCellInfoRequest) (*vtctldata.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, *vtctldata.AddCellsAliasRequest) (*vtctldata.AddCellsAliasResponse, error)
	// ApplyRoutingRules applies the VSchema routing rules.
	ApplyRoutingRules(context.Context, *vtctldata.ApplyRoutingRulesRequest) (*vtctldata.ApplyRoutingRulesResponse, error)
	// ApplyVSchema applies a vschema to a keyspace.
	ApplyVSchema(context.Context, *vtctldata.ApplyVSchemaRequest) (*vtctldata.ApplyVSchemaResponse, 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, *vtctldata.ChangeTabletTypeRequest) (*vtctldata.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, *vtctldata.CreateKeyspaceRequest) (*vtctldata.CreateKeyspaceResponse, error)
	// CreateShard creates the specified shard in the topology.
	CreateShard(context.Context, *vtctldata.CreateShardRequest) (*vtctldata.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, *vtctldata.DeleteCellInfoRequest) (*vtctldata.DeleteCellInfoResponse, error)
	// DeleteCellsAlias deletes the CellsAlias for the provided alias.
	DeleteCellsAlias(context.Context, *vtctldata.DeleteCellsAliasRequest) (*vtctldata.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, *vtctldata.DeleteKeyspaceRequest) (*vtctldata.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, *vtctldata.DeleteShardsRequest) (*vtctldata.DeleteShardsResponse, error)
	// DeleteTablets deletes one or more tablets from the topology.
	DeleteTablets(context.Context, *vtctldata.DeleteTabletsRequest) (*vtctldata.DeleteTabletsResponse, error)
	// EmergencyReparentShard reparents the shard to the new primary. It assumes
	// the old primary is dead or otherwise not responding.
	EmergencyReparentShard(context.Context, *vtctldata.EmergencyReparentShardRequest) (*vtctldata.EmergencyReparentShardResponse, error)
	// FindAllShardsInKeyspace returns a map of shard names to shard references
	// for a given keyspace.
	FindAllShardsInKeyspace(context.Context, *vtctldata.FindAllShardsInKeyspaceRequest) (*vtctldata.FindAllShardsInKeyspaceResponse, error)
	// GetBackups returns all the backups for a shard.
	GetBackups(context.Context, *vtctldata.GetBackupsRequest) (*vtctldata.GetBackupsResponse, error)
	// GetCellInfo returns the information for a cell.
	GetCellInfo(context.Context, *vtctldata.GetCellInfoRequest) (*vtctldata.GetCellInfoResponse, error)
	// GetCellInfoNames returns all the cells for which we have a CellInfo object,
	// meaning we have a topology service registered.
	GetCellInfoNames(context.Context, *vtctldata.GetCellInfoNamesRequest) (*vtctldata.GetCellInfoNamesResponse, error)
	// GetCellsAliases returns a mapping of cell alias to cells identified by that
	// alias.
	GetCellsAliases(context.Context, *vtctldata.GetCellsAliasesRequest) (*vtctldata.GetCellsAliasesResponse, error)
	// GetKeyspace reads the given keyspace from the topo and returns it.
	GetKeyspace(context.Context, *vtctldata.GetKeyspaceRequest) (*vtctldata.GetKeyspaceResponse, error)
	// GetKeyspaces returns the keyspace struct of all keyspaces in the topo.
	GetKeyspaces(context.Context, *vtctldata.GetKeyspacesRequest) (*vtctldata.GetKeyspacesResponse, error)
	// GetRoutingRules returns the VSchema routing rules.
	GetRoutingRules(context.Context, *vtctldata.GetRoutingRulesRequest) (*vtctldata.GetRoutingRulesResponse, error)
	// GetSchema returns the schema for a tablet, or just the schema for the
	// specified tables in that tablet.
	GetSchema(context.Context, *vtctldata.GetSchemaRequest) (*vtctldata.GetSchemaResponse, error)
	// GetShard returns information about a shard in the topology.
	GetShard(context.Context, *vtctldata.GetShardRequest) (*vtctldata.GetShardResponse, error)
	// GetSrvKeyspaces returns the SrvKeyspaces for a keyspace in one or more
	// cells.
	GetSrvKeyspaces(context.Context, *vtctldata.GetSrvKeyspacesRequest) (*vtctldata.GetSrvKeyspacesResponse, error)
	// GetSrvVSchema returns the SrvVSchema for a cell.
	GetSrvVSchema(context.Context, *vtctldata.GetSrvVSchemaRequest) (*vtctldata.GetSrvVSchemaResponse, error)
	// GetSrvVSchemas returns a mapping from cell name to SrvVSchema for all cells,
	// optionally filtered by cell name.
	GetSrvVSchemas(context.Context, *vtctldata.GetSrvVSchemasRequest) (*vtctldata.GetSrvVSchemasResponse, error)
	// GetTablet returns information about a tablet.
	GetTablet(context.Context, *vtctldata.GetTabletRequest) (*vtctldata.GetTabletResponse, error)
	// GetTablets returns tablets, optionally filtered by keyspace and shard.
	GetTablets(context.Context, *vtctldata.GetTabletsRequest) (*vtctldata.GetTabletsResponse, error)
	// GetVSchema returns the vschema for a keyspace.
	GetVSchema(context.Context, *vtctldata.GetVSchemaRequest) (*vtctldata.GetVSchemaResponse, error)
	// GetWorkflows returns a list of workflows for the given keyspace.
	GetWorkflows(context.Context, *vtctldata.GetWorkflowsRequest) (*vtctldata.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, *vtctldata.InitShardPrimaryRequest) (*vtctldata.InitShardPrimaryResponse, 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, *vtctldata.PlannedReparentShardRequest) (*vtctldata.PlannedReparentShardResponse, 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, *vtctldata.RebuildVSchemaGraphRequest) (*vtctldata.RebuildVSchemaGraphResponse, error)
	// RefreshState reloads the tablet record on the specified tablet.
	RefreshState(context.Context, *vtctldata.RefreshStateRequest) (*vtctldata.RefreshStateResponse, error)
	// RefreshStateByShard calls RefreshState on all the tablets in the given shard.
	RefreshStateByShard(context.Context, *vtctldata.RefreshStateByShardRequest) (*vtctldata.RefreshStateByShardResponse, error)
	// RemoveKeyspaceCell removes the specified cell from the Cells list for all
	// shards in the specified keyspace, as well as from the SrvKeyspace for that
	// keyspace in that cell.
	RemoveKeyspaceCell(context.Context, *vtctldata.RemoveKeyspaceCellRequest) (*vtctldata.RemoveKeyspaceCellResponse, error)
	// RemoveShardCell removes the specified cell from the specified shard's Cells
	// list.
	RemoveShardCell(context.Context, *vtctldata.RemoveShardCellRequest) (*vtctldata.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, *vtctldata.ReparentTabletRequest) (*vtctldata.ReparentTabletResponse, 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, *vtctldata.ShardReplicationPositionsRequest) (*vtctldata.ShardReplicationPositionsResponse, 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://vitess.io/docs/user-guides/configuration-advanced/reparenting/#external-reparenting.
	TabletExternallyReparented(context.Context, *vtctldata.TabletExternallyReparentedRequest) (*vtctldata.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, *vtctldata.UpdateCellInfoRequest) (*vtctldata.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, *vtctldata.UpdateCellsAliasRequest) (*vtctldata.UpdateCellsAliasResponse, error)
	// contains filtered or unexported methods
}

VtctldServer is the server API for Vtctld service. All implementations must embed UnimplementedVtctldServer for forward compatibility

Jump to

Keyboard shortcuts

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