Which is the corresponding Thrift type for:
- an Erlang tuple (I can imagine it’s a struct)
- an Erlang atom (if any?)
Is there any documentation available with the direct mappings between the Erlang types and the Thrift IDL types?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, I’ll try to answer myself 🙂
Apparently there is no direct translation of Erlang tuples in Thrift. What you can do is to include in your Erlang module the type definitions generated by Thrift and to write your Erlang code so that it uses the generated Erlang records as parameters and/or return values for your functions.
Erlang atoms must be translated into Thrift binaries (or eventually strings).
So, if you would like to have something like:
You will need to specify in your whatever.thrift file:
Plus, you need to write your Erlang function as:
Please, correct me if I’m wrong.