ExecutionPlane.Family.WebSocketGateway behaviour (execution_plane v0.3.1)

Copy Markdown View Source

WebSocket connect/send/backpressure/reconnect/revocation/close lifecycle.

Summary

Callbacks

close(t, keyword)

@callback close(ExecutionPlane.ExecutionRef.t(), keyword()) :: :ok | {:error, term()}

connect(t, keyword)

demand(t, pos_integer, keyword)

@callback demand(ExecutionPlane.ExecutionRef.t(), pos_integer(), keyword()) ::
  :ok | {:error, term()}

reconnect(t, t, keyword)

send(t, arg2, keyword)

@callback send(ExecutionPlane.ExecutionRef.t(), iodata() | map(), keyword()) ::
  :ok | {:error, term()}

status(t, keyword)

@callback status(ExecutionPlane.ExecutionRef.t(), keyword()) ::
  {:ok, ExecutionPlane.Runtime.Status.t()} | {:error, term()}

subscribe(t, pid, keyword)

@callback subscribe(ExecutionPlane.ExecutionRef.t(), pid(), keyword()) ::
  :ok | {:error, term()}