gRPC-haskell/examples/tutorial/arithmetic.proto
Connor Clark 169dbb7fff First draft of a tutorial (#15)
* add basic tutorial, re-export client stuff in HighLevel.Generated

* add a relative link in README.md

* forgot to document the language extensions

* cabal file fixup

* more context to compile-proto-file

* haskell syntax highlighting in markdown

* link to gRPC official tutorials for basic concepts

* add a note on how to build the examples

* prominent notice of required gRPC version

* fix typo

* do some error handling, show how to run the example executables

* use mapM
2017-04-30 15:38:29 -07:00

17 lines
248 B
Protocol Buffer

syntax = "proto3";
package arithmetic;
service Arithmetic {
rpc Add (TwoInts) returns (OneInt) {}
rpc RunningSum (stream OneInt) returns (OneInt) {}
}
message TwoInts {
int32 x = 1;
int32 y = 2;
}
message OneInt {
int32 result = 1;
}