The example/
directory of elixir-thrift contains an implementation of a simple calculator service. It serves two purposes:
- How to use this library.
- Example of what elixir-thrift generated code looks like.
The service is very simple, and implements the four basic arithmetic operations: addition, subtraction, multiplication, and division. It demonstrates how to add a Thrift server to a supervision tree, and how to write a handler for a service defined in Thrift. It also demonstrates how to use exceptions by implementing a division-by-zero exception.
For client usage, you should consult the test cases to see how to make requests to a Thrift service.