Wampex.Client (wampex_client v0.1.3)

Documentation for Wampex.

Link to this section Summary

Link to this section Functions

Specs

add(name :: module(), pid :: module() | pid()) ::
  {:ok, pid()} | {:error, term()}
Link to this function

call(name, call, timeout \\ 5000)

Specs

call(
  name :: module(),
  call :: Wampex.Roles.Caller.Call.t(),
  timeout :: integer()
) :: Wampex.Roles.Dealer.Result.t() | Wampex.Roles.Peer.Error.t()
Link to this function

callee_registry_name(name)

Specs

callee_registry_name(module()) :: module()
Link to this function

cast(name, request)

Specs

cast(name :: module(), Wampex.message()) :: :ok
Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

dependent_registry_name(name)

Specs

dependent_registry_name(module()) :: module()
Link to this function

error(name, error)

Specs

error(name :: module(), error :: Wampex.Roles.Peer.Error.t()) :: :ok

Specs

Callback implementation for Supervisor.init/1.

Link to this function

publish(name, event)

Specs

publish(name :: module(), event :: Wampex.Roles.Publisher.Publish.t()) :: :ok
Link to this function

register(name, reg, timeout \\ 5000)

Specs

register(
  name :: module(),
  register :: Wampex.Roles.Callee.Register.t(),
  timeout :: integer()
) :: {:ok, integer()}
Link to this function

remove(name, pid)

Specs

remove(name :: module(), pid :: module() | pid()) :: :ok
Link to this function

session_name(name)

Specs

session_name(module()) :: module()
Link to this function

start_link(list)

Specs

start_link(
  name: atom(),
  session_data: Wampex.Client.Session.t(),
  reconnect: boolean()
) ::
  {:ok, pid()}
  | {:error, {:already_started, pid()} | {:shutdown, term()} | term()}
Link to this function

subscribe(name, sub, timeout \\ 5000)

Specs

subscribe(
  name :: module(),
  subscription :: Wampex.Roles.Subscriber.Subscribe.t(),
  timeout :: integer()
) :: {:ok, integer()}
Link to this function

subscriber_registry_name(name)

Specs

subscriber_registry_name(module()) :: module()
Link to this function

sync(name, request, timeout \\ 5000)

Specs

sync(name :: module(), request :: Wampex.message(), timeout :: integer()) ::
  term()
Link to this function

yield(name, yield)

Specs

yield(name :: module(), yield :: Wampex.Roles.Callee.Yield.t()) :: :ok