PushEx.Behaviour.PushInstrumentation behaviour (PushEx v2.2.0)
Implementable hook points for push lifecycle instrumentation. Callbacks are required but do not need to do anything.
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.
Callbacks
Called immediately before an API response is delivered.
Called when an API request is started.
@callback delivered( %PushEx.Push{channel: term(), data: term(), event: term(), unix_ms: term()}, %PushEx.Instrumentation.Push.Context{unix_ms_occurred_at: 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.
@callback requested( %PushEx.Push{channel: term(), data: term(), event: term(), unix_ms: term()}, %PushEx.Instrumentation.Push.Context{unix_ms_occurred_at: term()} ) :: any()
Called when a push is requested to be sent. By default this happens in the API controller.