codemp-proto/proto/buffer.proto
zaaarf 966e4c6211
docs: written docs
Co-authored-by: alemi <me@alemi.dev>
2024-09-05 00:08:07 +02:00

25 lines
593 B
Protocol Buffer

syntax = "proto2";
import "common.proto";
package buffer;
// Handles buffer changes and keeps users in sync.
service Buffer {
// Attach to a buffer and receive operations.
rpc Attach (stream Operation) returns (stream BufferEvent);
}
// Message representing an operation that has occurred.
message Operation {
// The data of this operation.
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;
}