codemp-proto/proto/buffer.proto

26 lines
593 B
Protocol Buffer
Raw Normal View History

syntax = "proto2";
import "common.proto";
package buffer;
// Handles buffer changes and keeps users in sync.
service Buffer {
// Attach to a buffer and receive operations.
2024-03-09 19:07:23 +01:00
rpc Attach (stream Operation) returns (stream BufferEvent);
}
// Message representing an operation that has occurred.
message Operation {
// The data of this operation.
2024-03-09 19:07:23 +01:00
required bytes data = 1;
}
// Message representing an event that happened in a buffer.
message BufferEvent {
// The operation that occurred.
required Operation op = 1;
// The user that sent this event.
required common.Identity user = 2;
}