ExWapp.Client (ExWapp v0.1.2)

Copy Markdown View Source

High-level, runtime-neutral ExWapp client.

Store this struct wherever your application owns session state: a GenServer, a GenStateMachine, ETS, a job, or plain functional code in tests/scripts.

Summary

Functions

Creates a high-level client.

Records a compact trace entry on the client.

Types

status()

@type status() :: :new | :pairing | :connecting | :connected | :disconnected | :error

t()

@type t() :: %ExWapp.Client{
  events: module(),
  last_error: ExWapp.Error.t() | nil,
  metadata: map(),
  runtime: map(),
  session_id: term() | nil,
  status: status(),
  store: ExWapp.Store.t(),
  trace: [map()],
  transport: module()
}

Functions

new(opts \\ [])

@spec new(keyword()) :: t()

Creates a high-level client.

trace(client, operation, metadata \\ %{})

@spec trace(t(), atom(), map()) :: t()

Records a compact trace entry on the client.