RigInboundGatewayWeb.ConnectionInit (Reactive Interaction Gateway v3.0.0-alpha.2) View Source

Cowboy WebSocket handler.

As soon as Phoenix pulls in Cowboy 2 this will have to be rewritten using the :cowboy_websocket behaviour.

Link to this section Summary

Link to this section Types

Specs

handler_response() :: any()

Specs

on_error() :: (reason :: String.t() -> handler_response())

Specs

on_success() :: ([Rig.Subscription.t()] -> handler_response())

Link to this section Functions

Link to this function

set_up(conn_type, request, on_success, on_error, heartbeat_interval_ms, subscription_refresh_interval_ms)

View Source

Specs

set_up(
  String.t(),
  RIG.AuthorizationCheck.Request.t(),
  on_success(),
  on_error(),
  pos_integer(),
  pos_integer()
) :: handler_response()
Link to this function

subscriptions_query_param_to_body(query_params)

View Source

Specs

subscriptions_query_param_to_body(map()) ::
  {:ok, String.t()} | {:error, String.t()}