Soulless.Websocket.Client (Soulless v0.3.0)

Copy Markdown View Source

Summary

Functions

Generates the thin client wrapper (start/start_link/child_spec and, unless fetch: false, the fetch delegates) for a given implementation module, so each *_client only has to declare its implementation.

Send payload and block until the matching response arrives. Returns {:ok, response} or {:error, reason}.

Retrieve value from the handler_state by path.

Functions

__using__(opts)

(macro)

Generates the thin client wrapper (start/start_link/child_spec and, unless fetch: false, the fetch delegates) for a given implementation module, so each *_client only has to declare its implementation.

child_spec(args)

fetch(client, payload, timeout \\ nil)

@spec fetch(:gen_statem.server_ref(), term(), timeout() | nil) ::
  {:ok, term()} | {:error, term()}

Send payload and block until the matching response arrives. Returns {:ok, response} or {:error, reason}.

fetch_state(client, path)

@spec fetch_state(:gen_statem.server_ref(), [atom()]) :: term() | nil

Retrieve value from the handler_state by path.

start(opts)

@spec start(keyword()) :: :gen_statem.start_ret()

start_link(opts)

@spec start_link(keyword()) :: :gen_statem.start_ret()