railway_ipc v0.3.2 RailwayIpc.Core.MessageFormat.BinaryProtobuf
This is an internal module, not part of the public API.
Messages that use the
BinaryProtobuf format have the following
The payload s a struct that contains two attributes:
typeattribute is the name of the Elixir module for the protobuf without the "Elixir" prefix and to use colon notation instead of dots.
encoded_messageattribute is the encoded protobuf which is then Base64 encoded to make it friendly to JSON conversion.
The entire payload is then converted to JSON.
Note: I think the reason for converting to colon notation is an artifact of wanting to be compatable with the Ruby version since Ruby classes use colon notation. -BN
Link to this section Summary
Link to this section Functions
Decodes the given
message into a Protobuf
protobuf in message format. Returns the encoded protobuf and the
message type as a string in colon format.
Encodes the given
protobuf by creating a JSON string with two attributes:
type-- the Protobuf module name as a string using colon notation
encoded_message-- the Base64 encoded Protobuf