2015-06-10 19:22:08 +03:00
|
|
|
// Service definition for vtgateservice.
|
2015-06-09 20:32:25 +03:00
|
|
|
// This is the main entry point to Vitess.
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
2015-07-31 23:58:39 +03:00
|
|
|
option java_package="com.youtube.vitess.proto.grpc";
|
|
|
|
|
2015-06-09 20:32:25 +03:00
|
|
|
package vtgateservice;
|
|
|
|
|
2015-06-10 19:22:08 +03:00
|
|
|
import "vtgate.proto";
|
2015-06-09 20:32:25 +03:00
|
|
|
|
2015-08-28 21:08:50 +03:00
|
|
|
// Vitess is the main service to access a Vitess cluster. It is the API that vtgate
|
|
|
|
// exposes to serve all queries.
|
2015-06-19 18:20:58 +03:00
|
|
|
service Vitess {
|
2015-08-28 21:08:50 +03:00
|
|
|
// 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)
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc Execute(vtgate.ExecuteRequest) returns (vtgate.ExecuteResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
|
|
|
// ExecuteShards executes the query on the specified shards.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Custom Sharding
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc ExecuteShards(vtgate.ExecuteShardsRequest) returns (vtgate.ExecuteShardsResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
|
|
|
// ExecuteKeyspaceIds executes the query based on the specified keyspace ids.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Range Based Sharding
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc ExecuteKeyspaceIds(vtgate.ExecuteKeyspaceIdsRequest) returns (vtgate.ExecuteKeyspaceIdsResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
|
|
|
// ExecuteKeyRanges executes the query based on the specified key ranges.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Range Based Sharding
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc ExecuteKeyRanges(vtgate.ExecuteKeyRangesRequest) returns (vtgate.ExecuteKeyRangesResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
|
|
|
// ExecuteEntityIds executes the query based on the specified external id to keyspace id map.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Range Based Sharding
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc ExecuteEntityIds(vtgate.ExecuteEntityIdsRequest) returns (vtgate.ExecuteEntityIdsResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
|
|
|
// ExecuteBatchShards executes the list of queries on the specified shards.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Custom Sharding
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc ExecuteBatchShards(vtgate.ExecuteBatchShardsRequest) returns (vtgate.ExecuteBatchShardsResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
|
|
|
// ExecuteBatchKeyspaceIds executes the list of queries based on the specified keyspace ids.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Range Based Sharding
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc ExecuteBatchKeyspaceIds(vtgate.ExecuteBatchKeyspaceIdsRequest) returns (vtgate.ExecuteBatchKeyspaceIdsResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
2015-08-28 21:08:50 +03:00
|
|
|
// 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)
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc StreamExecute(vtgate.StreamExecuteRequest) returns (stream vtgate.StreamExecuteResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
2015-08-28 21:08:50 +03:00
|
|
|
// StreamExecuteShards executes a streaming query based on shards.
|
2015-06-09 20:32:25 +03:00
|
|
|
// Use this method if the query returns a large number of rows.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Custom Sharding
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc StreamExecuteShards(vtgate.StreamExecuteShardsRequest) returns (stream vtgate.StreamExecuteShardsResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
2015-08-28 21:08:50 +03:00
|
|
|
// StreamExecuteKeyspaceIds executes a streaming query based on keyspace ids.
|
2015-06-09 20:32:25 +03:00
|
|
|
// Use this method if the query returns a large number of rows.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Range Based Sharding
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc StreamExecuteKeyspaceIds(vtgate.StreamExecuteKeyspaceIdsRequest) returns (stream vtgate.StreamExecuteKeyspaceIdsResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
2015-08-28 21:08:50 +03:00
|
|
|
// StreamExecuteKeyRanges executes a streaming query based on key ranges.
|
2015-06-09 20:32:25 +03:00
|
|
|
// Use this method if the query returns a large number of rows.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Range Based Sharding
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc StreamExecuteKeyRanges(vtgate.StreamExecuteKeyRangesRequest) returns (stream vtgate.StreamExecuteKeyRangesResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
|
|
|
// Begin a transaction.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Transactions
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc Begin(vtgate.BeginRequest) returns (vtgate.BeginResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
|
|
|
// Commit a transaction.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Transactions
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc Commit(vtgate.CommitRequest) returns (vtgate.CommitResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
|
|
|
// Rollback a transaction.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Transactions
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc Rollback(vtgate.RollbackRequest) returns (vtgate.RollbackResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
|
|
|
|
// Split a query into non-overlapping sub queries
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Map Reduce
|
2015-06-10 19:22:08 +03:00
|
|
|
rpc SplitQuery(vtgate.SplitQueryRequest) returns (vtgate.SplitQueryResponse) {};
|
2015-07-29 01:55:06 +03:00
|
|
|
|
|
|
|
// 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.
|
2015-08-28 21:08:50 +03:00
|
|
|
// API group: Topology
|
2015-07-29 01:55:06 +03:00
|
|
|
rpc GetSrvKeyspace(vtgate.GetSrvKeyspaceRequest) returns (vtgate.GetSrvKeyspaceResponse) {};
|
2015-06-09 20:32:25 +03:00
|
|
|
}
|