mirror of
https://github.com/hexedtech/codemp.git
synced 2024-10-23 02:09:20 +02:00
25 lines
No EOL
503 B
Protocol Buffer
25 lines
No EOL
503 B
Protocol Buffer
syntax = "proto2";
|
|
|
|
package buffer_service;
|
|
|
|
// handle buffer changes, keep in sync users
|
|
service Buffer {
|
|
// attach to a buffer and receive operations
|
|
rpc Attach (stream Operation) returns (stream Operation);
|
|
|
|
rpc Snapshot(SnapshotRequest) returns (SnapshotResponse);
|
|
|
|
}
|
|
|
|
message Operation {
|
|
required bytes data = 1;
|
|
optional string user = 2;
|
|
optional string path = 3;
|
|
}
|
|
|
|
message SnapshotRequest {
|
|
required string path = 1;
|
|
}
|
|
message SnapshotResponse {
|
|
required string content = 1;
|
|
} |