minato_sup (minato v0.18.6)
View SourceThe supervisor over the pools.
Pools declared in the application environment are started here, so an application whose database is not up yet still starts: a pool is up before it has connections, and fills in the background.
{minato, [{pools, #{main => #{size => 10, connection => #{user => ~"minato"}}}},
{listeners, #{events => #{connection => #{user => ~"minato"}}}}]}start_pool/2 and start_listener/2 add one at run time. A pool is one_for_one and permanent: it
holds sockets, and a pool that died and stayed dead would take every caller with
it.
Summary
Functions
Start the supervisor and every pool the environment declares.
Add a listener at run time.
Add a pool at run time.
Stop a listener and forget it.
Stop a pool and forget it.
Functions
-spec start_link() -> supervisor:startlink_ret().
Start the supervisor and every pool the environment declares.
-spec start_listener(minato_listener:name(), minato_listener:opts()) -> supervisor:startchild_ret().
Add a listener at run time.
-spec start_pool(minato_pool:name(), minato_pool:opts()) -> supervisor:startchild_ret().
Add a pool at run time.
-spec stop_listener(minato_listener:name()) -> ok | {error, not_found}.
Stop a listener and forget it.
-spec stop_pool(minato_pool:name()) -> ok | {error, not_found}.
Stop a pool and forget it.