WalEx.Config.Registry (WalEx v4.8.0)

Copy Markdown View Source

Shared Registry used to look up per-app WalEx processes (config agent, GenServers, supervisors) by {module, app_name}.

All WalEx processes register themselves via set_name/3 so they can be located across the supervision tree without exporting module attributes.

Summary

Functions

Child spec for embedding the registry under another supervisor.

Fetches the current state of the registered agent for {module, app_name}.

Returns the {:via, Registry, ...} tuple that registers/looks up a process for {module, app_name}. The first argument is a tag (:set_agent, :set_gen_server, :set_supervisor) kept for call-site readability.

Starts the registry if not already running. Idempotent across applications.

Functions

child_spec()

Child spec for embedding the registry under another supervisor.

get_state(atom, module, app_name)

Fetches the current state of the registered agent for {module, app_name}.

set_name(atom, module, app_name)

Returns the {:via, Registry, ...} tuple that registers/looks up a process for {module, app_name}. The first argument is a tag (:set_agent, :set_gen_server, :set_supervisor) kept for call-site readability.

start_registry()

Starts the registry if not already running. Idempotent across applications.