Skip to content

Instantly share code, notes, and snippets.

@MarcusLongmuir
Last active April 25, 2017 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcusLongmuir/cf33f62f7a655dc9bee0963676bd43d7 to your computer and use it in GitHub Desktop.
Save MarcusLongmuir/cf33f62f7a655dc9bee0963676bd43d7 to your computer and use it in GitHub Desktop.
syntax = "proto3";
package examplecom.library;
message Book {
int64 isbn = 1;
string title = 2;
string author = 3;
}
message GetBookRequest {
int64 isbn = 1;
}
message QueryBooksRequest {
string author_prefix = 1;
}
service BookService {
rpc GetBook(GetBookRequest) returns (Book) {}
rpc QueryBooks(QueryBooksRequest) returns (stream Book) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment