8000 elixir-thrift/example at master · valitydev/elixir-thrift · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Example

The example/ directory of elixir-thrift contains an implementation of a simple calculator service. It serves two purposes:

  1. How to use this library.
  2. Example of what elixir-thrift generated code looks like.

Calculator Service

The service is very simple, and implements the four basic arithmetic operations: addition, subtraction, multiplication, and division. It demonstrates how to add 2F25 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.

0