syntax = "proto3"; package megaphone; import "google/protobuf/timestamp.proto"; service SyncService { rpc ForwardEvents(stream SyncRequest) returns (SyncReply); } message SyncRequest { oneof sync_event { PipeAgentStart pipe_agent_start = 1; PipeAgentEnd pipe_agent_end = 2; ChannelCreated channel_created = 3; ChannelDisposed channel_disposed = 4; EventReceived event_received = 5; } } message PipeAgentStart { string agent_id = 1; bytes key = 2; } message PipeAgentEnd { string agent_id = 1; } message ChannelCreated { string channel_id = 1; } message ChannelDisposed { string channel_id = 1; } message EventReceived { string channel_id = 1; string stream_id = 2; string event_id = 3; google.protobuf.Timestamp timestamp = 4; string json_payload = 5; } message SyncReply { string message = 1; }