Split.RPC.Encoder (split v0.1.0)

Encoder module for Splitd.

Summary

Functions

Encodes an RPC message using Msgpax and appends the size of the encoded message in bytes.

Functions

Link to this function

encode(message)

@spec encode(Split.RPC.Message.t()) :: iodata()

Encodes an RPC message using Msgpax and appends the size of the encoded message in bytes.

Examples

iex> message = Message.split("test_split")
...> [_size, encoded] = Encoder.encode(message)
...> Msgpax.unpack!(encoded)

%{"a" => ["test_split"], "o" => 161, "v" => 1}