Skip to content

Commit

Permalink
Merge pull request #123 from project-tsurugi/copy_proto_from_tsubakuro
Browse files Browse the repository at this point in the history
Copy proto files from tsubakuro
  • Loading branch information
YoshiakiNishimura authored Oct 17, 2024
2 parents 4a854eb + 89c9dc6 commit d19fb40
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 33 deletions.
31 changes: 17 additions & 14 deletions src/tateyama/proto/kvs/request.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ import "tateyama/proto/kvs/data.proto";

// request message for RPC.
message Request {
// the request message version.
uint64 message_version = 1;
reserved 2 to 10;
// service message version (major)
uint64 service_message_version_major = 1;

// service message version (minor)
uint64 service_message_version_minor = 2;
reserved 3 to 10;
reserved 15 to 20;
reserved 25 to 30;
reserved 32 to 40;
Expand Down Expand Up @@ -44,10 +47,10 @@ message Request {

// batch command.
Batch batch = 31;
// GetErrorInfo command.

// GetErrorInfo command.
GetErrorInfo get_error_info = 41;

// DisposeTransaction command.
DisposeTransaction dispose_transaction = 42;
}
Expand All @@ -58,7 +61,7 @@ message Index {

// the index specifier.
oneof specifier {

// the target table name.
string table_name = 1;
}
Expand Down Expand Up @@ -139,13 +142,13 @@ message Put {

// = OVERWRITE (default behavior).
PUT_TYPE_UNSPECIFIED = 0;

// Puts a table entry in any case.
OVERWRITE = 1;

// Puts a table entry only if it is absent.
IF_ABSENT = 2;

// Puts a table entry only if it is already exists.
IF_PRESENT = 3;
}
Expand All @@ -170,10 +173,10 @@ message Remove {

// = COUNTING (default behavior).
REMOVE_TYPE_UNSPECIFIED = 0;

// Remove table entries with counting the actually removed entries.
COUNTING = 1;

// Remove table entries without counting the actually removed entries.
INSTANT = 2;
}
Expand Down Expand Up @@ -223,10 +226,10 @@ message Scan {

// = FORWARD (default behavior).
SCAN_TYPE_UNSPECIFIED = 0;

// Scans over the table from head to tail.
FORWARD = 1;

// Scans over the table from tail to head.
BACKWARD = 2;
}
Expand Down
36 changes: 17 additions & 19 deletions src/tateyama/proto/kvs/response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ message Error {

// response message for RPC.
message Response {
// the response message version.
uint64 message_version = 1;
reserved 2 to 10;
reserved 1 to 10;
reserved 15 to 20;
reserved 25 to 30;
reserved 32 to 40;
Expand Down Expand Up @@ -53,10 +51,10 @@ message Response {

// batch command.
Batch batch = 31;
// GetErrorInfo command.

// GetErrorInfo command.
GetErrorInfo get_error_info = 41;

// DisposeTransaction command.
DisposeTransaction dispose_transaction = 42;
}
Expand All @@ -71,7 +69,7 @@ message Begin {
// the target transaction handle.
transaction.Handle transaction_handle = 1;
}

// the response body.
oneof result {
// request is successfully completed.
Expand Down Expand Up @@ -119,7 +117,7 @@ message Get {
// the record.
repeated data.Record records = 1;
}

// the response body.
oneof result {
// request is successfully completed.
Expand All @@ -136,10 +134,10 @@ message Put {

// request is successfully completed.
message Success {
// the number of records which the operation actually written
// the number of records which the operation actually written
sint32 written = 1;
}

// the response body.
oneof result {
// request is successfully completed.
Expand All @@ -156,10 +154,10 @@ message Remove {

// request is successfully completed.
message Success {
// the number of records which the operation actually removed
// the number of records which the operation actually removed
sint32 removed = 1;
}

// the response body.
oneof result {
// request is successfully completed.
Expand All @@ -176,19 +174,19 @@ message Batch {

message Opresult {
oneof opresult {
// result of begin
// result of begin
Begin begin = 21;

// result of commit
// result of commit
Commit commit = 22;

// result of put
// result of put
Put put = 23;

// result of get
// result of get
Get get = 24;

// result of remove
// result of remove
Remove remove = 25;
}
}
Expand All @@ -197,7 +195,7 @@ message Batch {
message Success {
repeated Opresult results = 1;
}

// the response body.
oneof result {
// request is successfully completed.
Expand Down Expand Up @@ -229,7 +227,7 @@ message GetErrorInfo {

// engine error occurred while the retrieving existing error information.
Error error = 13;
}
}
}

// DisposeTransaction operation
Expand Down

0 comments on commit d19fb40

Please sign in to comment.