Supervisor for distribution-attach sessions on the app node.
When an ExRatatui.App is started with transport: :distributed,
dispatch_start/1 starts this supervisor instead of the usual
Server process. The Listener sits idle until a remote node calls
ExRatatui.Distributed.attach/2, which triggers start_session/4
to spawn a Server in :distributed_server mode under the
Listener's DynamicSupervisor.
Usage
Typically you don't start this directly; use ExRatatui.App routes
start_link(transport: :distributed, ...) through here:
children = [
{MyApp.TUI, transport: :distributed}
]For full control you can add it to a supervision tree by hand:
children = [
{ExRatatui.Distributed.Listener, mod: MyApp.TUI}
]
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns the DynamicSupervisor pid used for per-attach sessions.
Starts the Listener supervisor.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec session_sup(Supervisor.supervisor()) :: pid()
Returns the DynamicSupervisor pid used for per-attach sessions.
@spec start_link(keyword()) :: Supervisor.on_start()
Starts the Listener supervisor.
Options
:mod(required) — theExRatatui.Appmodule to serve.:name— process registration name (default:__MODULE__). Passnilto skip registration.:app_opts— extra opts merged into every client'smount/1callback (e.g. shared PubSub topic names).