yggdrasil v3.2.1 Yggdrasil.Transformer behaviour View Source

Transformer behaviour. Defines how to decode and encode messages from a Yggdrasil.Channel.

Link to this section Summary

Callbacks

Callback to define how to decode the messages coming from a distributor adapter

Callback to define how to encode the messages coming from a publisher adapter

Link to this section Callbacks

Link to this callback decode(arg0, term) View Source
decode(Yggdrasil.Channel.t, term) ::
  {:ok, term} |
  {:error, term}

Callback to define how to decode the messages coming from a distributor adapter.

Link to this callback encode(arg0, term) View Source
encode(Yggdrasil.Channel.t, term) ::
  {:ok, term} |
  {:error, term}

Callback to define how to encode the messages coming from a publisher adapter.