Skip to content

Instantly share code, notes, and snippets.

@beerose
Created August 28, 2018 20:37
Show Gist options
  • Save beerose/1d22c701478eebcdde88006b90e8aea9 to your computer and use it in GitHub Desktop.
Save beerose/1d22c701478eebcdde88006b90e8aea9 to your computer and use it in GitHub Desktop.
syntax = "proto3";
package chatty;
service ChatService {
rpc SendMessage (SendMessageRequest) returns (SendMessageReply) {}
rpc FetchMessages (FetchMessagesRequest) returns (FetchMessagesReply) {}
}
message SendMessageRequest {
ChatMessage chat_message = 1;
}
message SendMessageReply {}
message FetchMessagesRequest {}
message FetchMessagesReply {
repeated ChatMessage messages = 1;
}
message ChatMessage {
string sender = 1;
string text = 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment