2020-07-27 12:15:48 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package remote;
|
|
|
|
|
|
|
|
option go_package = "./remote;remote";
|
|
|
|
option java_multiple_files = true;
|
|
|
|
option java_package = "io.turbo-geth.db";
|
|
|
|
option java_outer_classname = "KV";
|
|
|
|
|
2020-07-29 04:31:46 +00:00
|
|
|
// Provides methods to access key-value data
|
2021-02-13 07:41:47 +00:00
|
|
|
service KV { rpc Tx(stream Cursor) returns (stream Pair); }
|
2020-07-27 12:15:48 +00:00
|
|
|
|
2020-10-10 12:24:56 +00:00
|
|
|
enum Op {
|
|
|
|
FIRST = 0;
|
|
|
|
FIRST_DUP = 1;
|
|
|
|
SEEK = 2;
|
|
|
|
SEEK_BOTH = 3;
|
|
|
|
CURRENT = 4;
|
|
|
|
LAST = 6;
|
|
|
|
LAST_DUP = 7;
|
|
|
|
NEXT = 8;
|
|
|
|
NEXT_DUP = 9;
|
|
|
|
NEXT_NO_DUP = 11;
|
|
|
|
PREV = 12;
|
|
|
|
PREV_DUP = 13;
|
|
|
|
PREV_NO_DUP = 14;
|
|
|
|
SEEK_EXACT = 15;
|
|
|
|
SEEK_BOTH_EXACT = 16;
|
|
|
|
|
|
|
|
OPEN = 30;
|
|
|
|
CLOSE = 31;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Cursor {
|
|
|
|
Op op = 1;
|
|
|
|
string bucketName = 2;
|
|
|
|
uint32 cursor = 3;
|
|
|
|
bytes k = 4;
|
|
|
|
bytes v = 5;
|
|
|
|
}
|
|
|
|
|
2020-10-24 06:54:03 +00:00
|
|
|
message Pair {
|
2020-10-10 12:24:56 +00:00
|
|
|
bytes k = 1;
|
|
|
|
bytes v = 2;
|
|
|
|
uint32 cursorID = 3;
|
2020-07-27 12:15:48 +00:00
|
|
|
}
|