Skip to content

sile/thrift_protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thrift_protocol

hex.pm version Build Status Code Coverage License: MIT

An Erlang implementation of Thrift protocol.

Documentation

Examples

Body =
    #thrift_protocol_struct{
        fields = #{1 => true, 2 => {i8, -1}}
    },
Message =
    #thrift_protocol_message{
        method_name = <<"foo">>,
        message_type = call,
        sequence_id = 0,
        body = Body
    },

Encoded = list_to_binary(thrift_protocol:encode_message(Message, compact)),
<<130,33,0,3,102,111,111,17,19,255,0>> = Encoded,

{Decoded, <<>>} = thrift_protocol:decode_message(Encoded, compact),
Message = Decoded.

References

About

An Erlang implementation of Thrift protocol

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages