2022-07-13 01:56:21 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
package buffer;
|
|
|
|
|
|
|
|
service Buffer {
|
|
|
|
rpc Attach (stream Operation) returns (stream Operation);
|
2022-07-31 13:44:48 +02:00
|
|
|
rpc Push (BufferPayload) returns (BufferResponse);
|
|
|
|
rpc Pull (BufferPayload) returns (BufferPayload);
|
2022-07-13 01:56:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message Operation {
|
|
|
|
int64 opId = 1;
|
|
|
|
|
|
|
|
enum Action {
|
|
|
|
RETAIN = 0;
|
|
|
|
INSERT = 1;
|
|
|
|
DELETE = 2;
|
|
|
|
};
|
|
|
|
Action action = 2;
|
|
|
|
|
|
|
|
int32 row = 3;
|
|
|
|
int32 column = 4;
|
|
|
|
|
|
|
|
optional string text = 5;
|
|
|
|
}
|
2022-07-31 13:44:48 +02:00
|
|
|
|
|
|
|
message BufferPayload {
|
|
|
|
string sessionKey = 1;
|
|
|
|
string path = 2;
|
|
|
|
optional string content = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BufferResponse {
|
|
|
|
string sessionKey = 1;
|
|
|
|
string path = 2;
|
|
|
|
bool accepted = 3;
|
|
|
|
}
|