Normandy.Agents.Turn.Supervisor.Horde
(normandy v2.2.0)
View Source
Horde.DynamicSupervisor for Turn.Server processes — cluster-wide placement
and supervision. Children start under the registry's :via name (atomic
registration). resume_policy maps to the child restart value: :lazy →
:temporary (a lost node's session is NOT redistributed; it is rebuilt on the
next request), :eager → :transient (Phase 7d; redistributed on node-down).
:max_restarts / :max_seconds set the restart limit, with the same default
as Normandy.Agents.Turn.Supervisor (100 in 5 seconds).
Pass the supervisor's name to start_server/2, not the pid start_link/1
returns: that pid is Horde's outer Supervisor, which would accept the session
as a plain local child outside Horde's placement and supervision.
Summary
Functions
Starts the Horde supervisor (members: :auto).
Starts a Turn.Server for a session under the Horde supervisor sup (its name).
server_opts are checked in the caller before Horde starts anything.
Stops the session server pid, on any node, without a restart. Returns
{:error, :not_found} when the Horde supervisor sup (its name) has no such child.
Used by Normandy.Agents.Turn.Session.delete/1.
Functions
Starts the Horde supervisor (members: :auto).
Options
:name(term/0) - The Horde supervisor's name; pass it tostart_server/2. The default value isNormandy.Agents.Turn.Supervisor.Horde.:max_restarts(non_neg_integer/0) - Restarts allowed within:max_seconds. The default value is100.:max_seconds(pos_integer/0) - The window for:max_restarts, in seconds. The default value is5.
Starts a Turn.Server for a session under the Horde supervisor sup (its name).
server_opts are checked in the caller before Horde starts anything.
Options
The options of Normandy.Agents.Turn.Server.start_link/1.
Stops the session server pid, on any node, without a restart. Returns
{:error, :not_found} when the Horde supervisor sup (its name) has no such child.
Used by Normandy.Agents.Turn.Session.delete/1.