vitess-gh/proto/vtgateservice.proto

93 строки
4.3 KiB
Protocol Buffer
Исходник Обычный вид История

// Service definition for vtgateservice.
2015-06-09 20:32:25 +03:00
// This is the main entry point to Vitess.
syntax = "proto3";
option java_package="com.youtube.vitess.proto.grpc";
2015-06-09 20:32:25 +03:00
package vtgateservice;
import "vtgate.proto";
2015-06-09 20:32:25 +03:00
// 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) {};
2015-06-09 20:32:25 +03:00
// ExecuteShards executes the query on the specified shards.
// API group: Custom Sharding
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.
// API group: Range-based Sharding
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.
// API group: Range-based Sharding
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.
// API group: Range-based Sharding
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.
// API group: Custom Sharding
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.
// API group: Range-based Sharding
rpc ExecuteBatchKeyspaceIds(vtgate.ExecuteBatchKeyspaceIdsRequest) returns (vtgate.ExecuteBatchKeyspaceIdsResponse) {};
2015-06-09 20:32:25 +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)
rpc StreamExecute(vtgate.StreamExecuteRequest) returns (stream vtgate.StreamExecuteResponse) {};
2015-06-09 20:32:25 +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.
// API group: Custom Sharding
rpc StreamExecuteShards(vtgate.StreamExecuteShardsRequest) returns (stream vtgate.StreamExecuteShardsResponse) {};
2015-06-09 20:32:25 +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.
// API group: Range-based Sharding
rpc StreamExecuteKeyspaceIds(vtgate.StreamExecuteKeyspaceIdsRequest) returns (stream vtgate.StreamExecuteKeyspaceIdsResponse) {};
2015-06-09 20:32:25 +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.
// API group: Range-based Sharding
rpc StreamExecuteKeyRanges(vtgate.StreamExecuteKeyRangesRequest) returns (stream vtgate.StreamExecuteKeyRangesResponse) {};
2015-06-09 20:32:25 +03:00
// Begin a transaction.
// API group: Transactions
rpc Begin(vtgate.BeginRequest) returns (vtgate.BeginResponse) {};
2015-06-09 20:32:25 +03:00
// Commit a transaction.
// API group: Transactions
rpc Commit(vtgate.CommitRequest) returns (vtgate.CommitResponse) {};
2015-06-09 20:32:25 +03:00
// Rollback a transaction.
// API group: Transactions
rpc Rollback(vtgate.RollbackRequest) returns (vtgate.RollbackResponse) {};
2015-06-09 20:32:25 +03:00
// Split a query into non-overlapping sub queries
// API group: Map Reduce
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.
// 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
}