PushEx v1.0.0-rc2 PushEx.Behaviour.PushInstrumentation behaviour

Implementable hook points for push lifecycle instrumentation. Callbacks are required but do not need to do anything.

Link to this section Summary

Callbacks

Called immediately before an API response is delivered

Called when an API request is started

Called when a push is delivered to a Channel. This can occur more, less, or the same number of times as a push being requested

Called when a push is requested to be sent. By default this happens in the API controller

Link to this section Callbacks

Link to this callback api_processed()
api_processed() :: any()

Called immediately before an API response is delivered.

Link to this callback api_requested()
api_requested() :: any()

Called when an API request is started.

Link to this callback delivered(%)
delivered(%PushEx.Push{
  channel: term(),
  data: term(),
  event: term(),
  unix_ms: term()
}) :: any()

Called when a push is delivered to a Channel. This can occur more, less, or the same number of times as a push being requested.

Link to this callback requested(%)
requested(%PushEx.Push{
  channel: term(),
  data: term(),
  event: term(),
  unix_ms: term()
}) :: any()

Called when a push is requested to be sent. By default this happens in the API controller.