Sippet v0.6.2 Sippet.Transactions.Registry View Source

The transactions registry, where client and server transaction keys are associated to transaction processes.

Link to this section Summary

Functions

Returns all client or server keys associated with the given process

Looks up if a registered process exists to handle the given key

Registers the current process under the given client or server transaction key in the transactions registry

Starts the transactions registry

Takes a {:via, Registry, {registry, key}} tuple corresponding to this registry for the given key

Link to this section Types

Link to this section Functions

Returns all client or server keys associated with the given process.

Looks up if a registered process exists to handle the given key.

An empty list if there is no match.

Link to this function

register_alias(key) View Source
register_alias(client_key() | server_key()) ::
  {:ok, pid()} | {:error, {:already_registered, pid()}}

Registers the current process under the given client or server transaction key in the transactions registry.

By doing so, incoming requests or responses will be redirected to the current transaction process once they come. The registry is cleared once the process closes.

Starts the transactions registry.

The registry is partitioned according to the number of schedulers available.

Link to this function

via_tuple(key) View Source
via_tuple(client_key() | server_key()) ::
  {:via, Registry, {Sippet.Transactions.Registry, client_key() | server_key()}}

Takes a {:via, Registry, {registry, key}} tuple corresponding to this registry for the given key.