vitess-gh/proto/vtgateservice.proto

93 строки
4.3 KiB
Protocol Buffer

// Service definition for vtgateservice.
// This is the main entry point to Vitess.
syntax = "proto3";
option java_package="com.youtube.vitess.proto.grpc";
package vtgateservice;
import "vtgate.proto";
// Vitess is the main service to access a Vitess cluster. It is the API that vtgate
// exposes to serve all queries.
service Vitess {
// Execute tries to route the query to the right shard.
// It depends on the query and bind variables to provide enough
// information in conjonction with the vindexes to route the query.
// API group: v3 API (alpha)
rpc Execute(vtgate.ExecuteRequest) returns (vtgate.ExecuteResponse) {};
// ExecuteShards executes the query on the specified shards.
// API group: Custom Sharding
rpc ExecuteShards(vtgate.ExecuteShardsRequest) returns (vtgate.ExecuteShardsResponse) {};
// ExecuteKeyspaceIds executes the query based on the specified keyspace ids.
// API group: Range-based Sharding
rpc ExecuteKeyspaceIds(vtgate.ExecuteKeyspaceIdsRequest) returns (vtgate.ExecuteKeyspaceIdsResponse) {};
// ExecuteKeyRanges executes the query based on the specified key ranges.
// API group: Range-based Sharding
rpc ExecuteKeyRanges(vtgate.ExecuteKeyRangesRequest) returns (vtgate.ExecuteKeyRangesResponse) {};
// ExecuteEntityIds executes the query based on the specified external id to keyspace id map.
// API group: Range-based Sharding
rpc ExecuteEntityIds(vtgate.ExecuteEntityIdsRequest) returns (vtgate.ExecuteEntityIdsResponse) {};
// ExecuteBatchShards executes the list of queries on the specified shards.
// API group: Custom Sharding
rpc ExecuteBatchShards(vtgate.ExecuteBatchShardsRequest) returns (vtgate.ExecuteBatchShardsResponse) {};
// ExecuteBatchKeyspaceIds executes the list of queries based on the specified keyspace ids.
// API group: Range-based Sharding
rpc ExecuteBatchKeyspaceIds(vtgate.ExecuteBatchKeyspaceIdsRequest) returns (vtgate.ExecuteBatchKeyspaceIdsResponse) {};
// StreamExecute executes a streaming query based on shards.
// It depends on the query and bind variables to provide enough
// information in conjonction with the vindexes to route the query.
// Use this method if the query returns a large number of rows.
// API group: v3 API (alpha)
rpc StreamExecute(vtgate.StreamExecuteRequest) returns (stream vtgate.StreamExecuteResponse) {};
// StreamExecuteShards executes a streaming query based on shards.
// Use this method if the query returns a large number of rows.
// API group: Custom Sharding
rpc StreamExecuteShards(vtgate.StreamExecuteShardsRequest) returns (stream vtgate.StreamExecuteShardsResponse) {};
// StreamExecuteKeyspaceIds executes a streaming query based on keyspace ids.
// Use this method if the query returns a large number of rows.
// API group: Range-based Sharding
rpc StreamExecuteKeyspaceIds(vtgate.StreamExecuteKeyspaceIdsRequest) returns (stream vtgate.StreamExecuteKeyspaceIdsResponse) {};
// StreamExecuteKeyRanges executes a streaming query based on key ranges.
// Use this method if the query returns a large number of rows.
// API group: Range-based Sharding
rpc StreamExecuteKeyRanges(vtgate.StreamExecuteKeyRangesRequest) returns (stream vtgate.StreamExecuteKeyRangesResponse) {};
// Begin a transaction.
// API group: Transactions
rpc Begin(vtgate.BeginRequest) returns (vtgate.BeginResponse) {};
// Commit a transaction.
// API group: Transactions
rpc Commit(vtgate.CommitRequest) returns (vtgate.CommitResponse) {};
// Rollback a transaction.
// API group: Transactions
rpc Rollback(vtgate.RollbackRequest) returns (vtgate.RollbackResponse) {};
// Split a query into non-overlapping sub queries
// API group: Map Reduce
rpc SplitQuery(vtgate.SplitQueryRequest) returns (vtgate.SplitQueryResponse) {};
// GetSrvKeyspace returns a SrvKeyspace object (as seen by this vtgate).
// This method is provided as a convenient way for clients to take a
// look at the sharding configuration for a Keyspace. Looking at the
// sharding information should not be used for routing queries (as the
// information may change, use the Execute calls for that).
// It is convenient for monitoring applications for instance, or if
// using custom sharding.
// API group: Topology
rpc GetSrvKeyspace(vtgate.GetSrvKeyspaceRequest) returns (vtgate.GetSrvKeyspaceResponse) {};
}