Skip to content

Commit b057b35

Browse files
committed
Merge pull request #1054 from alainjobart/replication
Adding comments to the proto definition, and API groups.
2 parents f53c4c9 + 6353230 commit b057b35

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

proto/vtgateservice.proto

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,55 +9,75 @@ package vtgateservice;
99

1010
import "vtgate.proto";
1111

12+
// Vitess is the main service to access a Vitess cluster. It is the API that vtgate
13+
// exposes to serve all queries.
1214
service Vitess {
13-
// Execute executes tries to route the query to the right shard.
14-
// (this is a vtgate v3 API, use carefully)
15+
// Execute tries to route the query to the right shard.
16+
// It depends on the query and bind variables to provide enough
17+
// information in conjonction with the vindexes to route the query.
18+
// API group: v3 API (alpha)
1519
rpc Execute(vtgate.ExecuteRequest) returns (vtgate.ExecuteResponse) {};
1620

1721
// ExecuteShards executes the query on the specified shards.
22+
// API group: Custom Sharding
1823
rpc ExecuteShards(vtgate.ExecuteShardsRequest) returns (vtgate.ExecuteShardsResponse) {};
1924

2025
// ExecuteKeyspaceIds executes the query based on the specified keyspace ids.
26+
// API group: Range Based Sharding
2127
rpc ExecuteKeyspaceIds(vtgate.ExecuteKeyspaceIdsRequest) returns (vtgate.ExecuteKeyspaceIdsResponse) {};
2228

2329
// ExecuteKeyRanges executes the query based on the specified key ranges.
30+
// API group: Range Based Sharding
2431
rpc ExecuteKeyRanges(vtgate.ExecuteKeyRangesRequest) returns (vtgate.ExecuteKeyRangesResponse) {};
2532

2633
// ExecuteEntityIds executes the query based on the specified external id to keyspace id map.
34+
// API group: Range Based Sharding
2735
rpc ExecuteEntityIds(vtgate.ExecuteEntityIdsRequest) returns (vtgate.ExecuteEntityIdsResponse) {};
2836

2937
// ExecuteBatchShards executes the list of queries on the specified shards.
38+
// API group: Custom Sharding
3039
rpc ExecuteBatchShards(vtgate.ExecuteBatchShardsRequest) returns (vtgate.ExecuteBatchShardsResponse) {};
3140

3241
// ExecuteBatchKeyspaceIds executes the list of queries based on the specified keyspace ids.
42+
// API group: Range Based Sharding
3343
rpc ExecuteBatchKeyspaceIds(vtgate.ExecuteBatchKeyspaceIdsRequest) returns (vtgate.ExecuteBatchKeyspaceIdsResponse) {};
3444

35-
// StreamExecute exectures a streaming query based on shards.
36-
// (this is a vtgate v3 API, use carefully)
45+
// StreamExecute executes a streaming query based on shards.
46+
// It depends on the query and bind variables to provide enough
47+
// information in conjonction with the vindexes to route the query.
48+
// Use this method if the query returns a large number of rows.
49+
// API group: v3 API (alpha)
3750
rpc StreamExecute(vtgate.StreamExecuteRequest) returns (stream vtgate.StreamExecuteResponse) {};
3851

39-
// StreamExecuteShard exectures a streaming query based on shards.
52+
// StreamExecuteShards executes a streaming query based on shards.
4053
// Use this method if the query returns a large number of rows.
54+
// API group: Custom Sharding
4155
rpc StreamExecuteShards(vtgate.StreamExecuteShardsRequest) returns (stream vtgate.StreamExecuteShardsResponse) {};
4256

43-
// StreamExecuteKeyspaceIds exectures a streaming query based on keyspace ids.
57+
// StreamExecuteKeyspaceIds executes a streaming query based on keyspace ids.
4458
// Use this method if the query returns a large number of rows.
59+
// API group: Range Based Sharding
4560
rpc StreamExecuteKeyspaceIds(vtgate.StreamExecuteKeyspaceIdsRequest) returns (stream vtgate.StreamExecuteKeyspaceIdsResponse) {};
4661

47-
// StreamExecuteKeyRanges exectures a streaming query based on key ranges.
62+
// StreamExecuteKeyRanges executes a streaming query based on key ranges.
4863
// Use this method if the query returns a large number of rows.
64+
// API group: Range Based Sharding
4965
rpc StreamExecuteKeyRanges(vtgate.StreamExecuteKeyRangesRequest) returns (stream vtgate.StreamExecuteKeyRangesResponse) {};
5066

5167
// Begin a transaction.
68+
// API group: Transactions
5269
rpc Begin(vtgate.BeginRequest) returns (vtgate.BeginResponse) {};
5370

5471
// Commit a transaction.
72+
// API group: Transactions
5573
rpc Commit(vtgate.CommitRequest) returns (vtgate.CommitResponse) {};
5674

5775
// Rollback a transaction.
76+
// API group: Transactions
5877
rpc Rollback(vtgate.RollbackRequest) returns (vtgate.RollbackResponse) {};
5978

6079
// Split a query into non-overlapping sub queries
80+
// API group: Map Reduce
6181
rpc SplitQuery(vtgate.SplitQueryRequest) returns (vtgate.SplitQueryResponse) {};
6282

6383
// GetSrvKeyspace returns a SrvKeyspace object (as seen by this vtgate).
@@ -67,5 +87,6 @@ service Vitess {
6787
// information may change, use the Execute calls for that).
6888
// It is convenient for monitoring applications for instance, or if
6989
// using custom sharding.
90+
// API group: Topology
7091
rpc GetSrvKeyspace(vtgate.GetSrvKeyspaceRequest) returns (vtgate.GetSrvKeyspaceResponse) {};
7192
}

0 commit comments

Comments
 (0)