Pushest v0.2.2 Pushest.Router View Source

Routes calls/cast from a module using Pushest to either Socket or Api GenServers.

Link to this section Summary

Types

Optional options for cast function

Functions

Sync call either Socket or Api GenServers with given message

Async cast either Socket or Api GenServers with given message

Link to this section Types

Link to this type call_term() View Source
call_term() :: :presence | :channels | :subscribed_channels
Link to this type cast_opts() View Source
cast_opts() :: [{:force_api, boolean()}]

Optional options for cast function.

  • :force_api - Always triggers via Pusher REST API endpoint when set to true
Link to this type cast_term() View Source
cast_term() ::
  {:subscribe, String.t(), map()}
  | {:trigger, String.t(), String.t(), map()}
  | {:unsubscribe, String.t()}

Link to this section Functions

Sync call either Socket or Api GenServers with given message.

Async cast either Socket or Api GenServers with given message.

Link to this function cast(arg, list) View Source
cast({:trigger, String.t(), String.t(), map()}, cast_opts()) :: :ok