vitess-gh/proto/vtgate.proto

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

// Data definitions for service vtgateservice.
syntax = "proto3";
package vtgate;
option java_package="com.youtube.vitess.proto";
import "query.proto";
import "topodata.proto";
import "vtrpc.proto";
// Session objects are session cookies and are invalidated on
// use. Query results will contain updated session values.
// Their content should be opaque to the user.
message Session {
bool in_transaction = 1;
message ShardSession {
query.Target target = 1;
int64 transaction_id = 2;
}
repeated ShardSession shard_sessions = 2;
}
// ExecuteRequest is the payload to Execute
message ExecuteRequest {
vtrpc.CallerID caller_id = 1;
Session session = 2;
query.BoundQuery query = 3;
2015-07-20 16:54:12 +03:00
topodata.TabletType tablet_type = 4;
bool not_in_transaction = 5;
}
// ExecuteResponse is the returned value from Execute
message ExecuteResponse {
vtrpc.RPCError error = 1;
Session session = 2;
query.QueryResult result = 3;
}
// ExecuteShardsRequest is the payload to ExecuteShards
message ExecuteShardsRequest {
vtrpc.CallerID caller_id = 1;
Session session = 2;
query.BoundQuery query = 3;
string keyspace = 4;
repeated string shards = 5;
2015-07-20 16:54:12 +03:00
topodata.TabletType tablet_type = 6;
bool not_in_transaction = 7;
}
// ExecuteShardsResponse is the returned value from ExecuteShards
message ExecuteShardsResponse {
vtrpc.RPCError error = 1;
Session session = 2;
query.QueryResult result = 3;
}
// ExecuteKeyspaceIdsRequest is the payload to ExecuteKeyspaceIds
message ExecuteKeyspaceIdsRequest {
vtrpc.CallerID caller_id = 1;
Session session = 2;
query.BoundQuery query = 3;
string keyspace = 4;
repeated bytes keyspace_ids = 5;
2015-07-20 16:54:12 +03:00
topodata.TabletType tablet_type = 6;
bool not_in_transaction = 7;
}
// ExecuteKeyspaceIdsResponse is the returned value from ExecuteKeyspaceIds
message ExecuteKeyspaceIdsResponse {
vtrpc.RPCError error = 1;
Session session = 2;
query.QueryResult result = 3;
}
// ExecuteKeyRangesRequest is the payload to ExecuteKeyRanges
message ExecuteKeyRangesRequest {
vtrpc.CallerID caller_id = 1;
Session session = 2;
query.BoundQuery query = 3;
string keyspace = 4;
repeated topodata.KeyRange key_ranges = 5;
2015-07-20 16:54:12 +03:00
topodata.TabletType tablet_type = 6;
bool not_in_transaction = 7;
}
// ExecuteKeyRangesResponse is the returned value from ExecuteKeyRanges
message ExecuteKeyRangesResponse {
vtrpc.RPCError error = 1;
Session session = 2;
query.QueryResult result = 3;
}
// ExecuteEntityIdsRequest is the payload to ExecuteEntityIds
message ExecuteEntityIdsRequest {
vtrpc.CallerID caller_id = 1;
Session session = 2;
query.BoundQuery query = 3;
string keyspace = 4;
string entity_column_name = 5;
message EntityId {
enum Type {
TYPE_NULL = 0;
TYPE_BYTES = 1;
TYPE_INT = 2;
TYPE_UINT = 3;
TYPE_FLOAT = 4;
}
Type xid_type = 1;
bytes xid_bytes = 2;
int64 xid_int = 3;
uint64 xid_uint = 4;
double xid_float = 5;
bytes keyspace_id = 6;
}
repeated EntityId entity_keyspace_ids = 6;
2015-07-20 16:54:12 +03:00
topodata.TabletType tablet_type = 7;
bool not_in_transaction = 8;
}
// ExecuteEntityIdsResponse is the returned value from ExecuteEntityIds
message ExecuteEntityIdsResponse {
vtrpc.RPCError error = 1;
Session session = 2;
query.QueryResult result = 3;
}
// BoundShardQuery represents a single query request for the
// specified list of shards. This is used in a list for
// ExecuteBatchShardsRequest.
message BoundShardQuery {
query.BoundQuery query = 1;
string keyspace = 2;
repeated string shards = 3;
}
// ExecuteBatchShardsRequest is the payload to ExecuteBatchShards
message ExecuteBatchShardsRequest {
vtrpc.CallerID caller_id = 1;
Session session = 2;
repeated BoundShardQuery queries = 3;
2015-07-20 16:54:12 +03:00
topodata.TabletType tablet_type = 4;
bool as_transaction = 5;
}
// ExecuteBatchShardsResponse is the returned value from ExecuteBatchShards
message ExecuteBatchShardsResponse {
vtrpc.RPCError error = 1;
Session session = 2;
repeated query.QueryResult results = 3;
}
// BoundKeyspaceIdQuery represents a single query request for the
// specified list of keyspace ids. This is used in a list for
// ExecuteBatchKeyspaceIdsRequest.
message BoundKeyspaceIdQuery {
query.BoundQuery query = 1;
string keyspace = 2;
repeated bytes keyspace_ids = 3;
}
// ExecuteBatchKeyspaceIdsRequest is the payload to ExecuteBatchKeyspaceId
message ExecuteBatchKeyspaceIdsRequest {
vtrpc.CallerID caller_id = 1;
Session session = 2;
repeated BoundKeyspaceIdQuery queries = 3;
2015-07-20 16:54:12 +03:00
topodata.TabletType tablet_type = 4;
bool as_transaction = 5;
}
// ExecuteBatchKeyspaceIdsResponse is the returned value from ExecuteBatchKeyspaceId
message ExecuteBatchKeyspaceIdsResponse {
vtrpc.RPCError error = 1;
Session session = 2;
repeated query.QueryResult results = 3;
}
// StreamExecuteRequest is the payload to StreamExecute
message StreamExecuteRequest {
vtrpc.CallerID caller_id = 1;
query.BoundQuery query = 2;
2015-07-20 16:54:12 +03:00
topodata.TabletType tablet_type = 3;
}
// StreamExecuteResponse is the returned value from StreamExecute
message StreamExecuteResponse {
vtrpc.RPCError error = 1;
query.QueryResult result = 2;
}
// StreamExecuteShardsRequest is the payload to StreamExecuteShards
message StreamExecuteShardsRequest {
vtrpc.CallerID caller_id = 1;
query.BoundQuery query = 2;
string keyspace = 3;
repeated string shards = 4;
2015-07-20 16:54:12 +03:00
topodata.TabletType tablet_type = 5;
}
// StreamExecuteShardsResponse is the returned value from StreamExecuteShards
message StreamExecuteShardsResponse {
vtrpc.RPCError error = 1;
query.QueryResult result = 2;
}
// StreamExecuteKeyspaceIdsRequest is the payload to StreamExecuteKeyspaceIds
message StreamExecuteKeyspaceIdsRequest {
vtrpc.CallerID caller_id = 1;
query.BoundQuery query = 2;
string keyspace = 3;
repeated bytes keyspace_ids = 4;
2015-07-20 16:54:12 +03:00
topodata.TabletType tablet_type = 5;
}
// StreamExecuteKeyspaceIdsResponse is the returned value from StreamExecuteKeyspaceIds
message StreamExecuteKeyspaceIdsResponse {
vtrpc.RPCError error = 1;
query.QueryResult result = 2;
}
// StreamExecuteKeyRangesRequest is the payload to StreamExecuteKeyRanges
message StreamExecuteKeyRangesRequest {
vtrpc.CallerID caller_id = 1;
query.BoundQuery query = 2;
string keyspace = 3;
repeated topodata.KeyRange key_ranges = 4;
2015-07-20 16:54:12 +03:00
topodata.TabletType tablet_type = 5;
}
// StreamExecuteKeyRangesResponse is the returned value from StreamExecuteKeyRanges
message StreamExecuteKeyRangesResponse {
vtrpc.RPCError error = 1;
query.QueryResult result = 2;
}
// BeginRequest is the payload to Begin
message BeginRequest {
vtrpc.CallerID caller_id = 1;
}
// BeginResponse is the returned value from Begin
message BeginResponse {
vtrpc.RPCError error = 1;
Session session = 2;
}
// CommitRequest is the payload to Commit
message CommitRequest {
vtrpc.CallerID caller_id = 1;
Session session = 2;
}
// CommitResponse is the returned value from Commit
message CommitResponse {
vtrpc.RPCError error = 1;
}
// RollbackRequest is the payload to Rollback
message RollbackRequest {
vtrpc.CallerID caller_id = 1;
Session session = 2;
}
// RollbackResponse is the returned value from Rollback
message RollbackResponse {
vtrpc.RPCError error = 1;
}
// SplitQueryRequest is the payload to SplitQuery
message SplitQueryRequest {
vtrpc.CallerID caller_id = 1;
string keyspace = 2;
query.BoundQuery query = 3;
2015-07-20 20:24:31 +03:00
string split_column = 4;
int64 split_count = 5;
}
// SplitQueryResponse is the returned value from SplitQuery
message SplitQueryResponse {
message KeyRangePart {
string keyspace = 1;
repeated topodata.KeyRange key_ranges = 2;
}
message ShardPart {
string keyspace = 1;
repeated string shards = 2;
}
message Part {
query.BoundQuery query = 1;
KeyRangePart key_range_part = 2;
ShardPart shard_part = 3;
int64 size = 4;
}
repeated Part splits = 1;
}
2015-07-29 01:55:06 +03:00
// GetSrvKeyspaceRequest is the payload to GetSrvKeyspace
message GetSrvKeyspaceRequest {
string keyspace = 1;
}
// GetSrvKeyspaceResponse is the returned value from GetSrvKeyspace
message GetSrvKeyspaceResponse {
topodata.SrvKeyspace srv_keyspace = 1;
}