cartel v0.6.0 Cartel.Pusher behaviour

Behaviour for the implementation of push workers

Summary

Callbacks

Pushers must implement actual message sending via this callback

Callbacks

handle_push(pid, message, payload)

Specs

handle_push(pid :: pid, message :: Cartel.Message.t, payload :: binary) ::
  :ok |
  :error

Pushers must implement actual message sending via this callback

  • message: The message struct of the message to be sent, included to allow metadata additions by the Cartel.Pusher.handle_push/3 impelementation.
  • payload: binary to be used for wire transmission, encoded via the message Cartel.Message.serialize/1 implementation.