2023-12-18 23:36:15 +01:00
|
|
|
syntax = "proto2";
|
|
|
|
|
2023-12-29 01:06:28 +01:00
|
|
|
package buffer_service;
|
2023-12-18 23:36:15 +01:00
|
|
|
|
|
|
|
// handle buffer changes, keep in sync users
|
|
|
|
service Buffer {
|
|
|
|
// attach to a buffer and receive operations
|
|
|
|
rpc Attach (stream Operation) returns (stream Operation);
|
2024-01-26 21:39:21 +01:00
|
|
|
|
|
|
|
rpc Snapshot(SnapshotRequest) returns (SnapshotResponse);
|
|
|
|
|
2023-12-18 23:36:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message Operation {
|
|
|
|
required bytes data = 1;
|
|
|
|
optional string user = 2;
|
|
|
|
optional string path = 3;
|
2024-01-26 21:39:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message SnapshotRequest {
|
|
|
|
required string path = 1;
|
|
|
|
}
|
2024-01-27 11:49:05 +01:00
|
|
|
|
2024-01-26 21:39:21 +01:00
|
|
|
message SnapshotResponse {
|
|
|
|
required string content = 1;
|
2023-12-18 23:36:15 +01:00
|
|
|
}
|