Normandy.Behaviours.SessionRegistry.Horde
(normandy v2.2.0)
View Source
Distributed SessionRegistry over Horde.Registry (keys: :unique,
members: :auto). The handle is the registry's name (an atom). Cluster-wide
whereis; registration is atomic when servers start under the :via name from
child_name/2. Works as a cluster-of-one on a single node (and on
nonode@nohost) with the same config that serves N nodes.
Summary
Functions
Via-name for an atomic, supervisor-driven start (see SessionRegistry.child_name/2).
It names SessionRegistry.Horde.Via, whose registration is visible to
whereis_name/1 as soon as it answers, as a :gen_statem start requires.
Convenience for tests: start a uniquely-named registry and return its name.
Starts a unique Horde.Registry.
Functions
Via-name for an atomic, supervisor-driven start (see SessionRegistry.child_name/2).
It names SessionRegistry.Horde.Via, whose registration is visible to
whereis_name/1 as soon as it answers, as a :gen_statem start requires.
Convenience for tests: start a uniquely-named registry and return its name.
Waits until the registry actually accepts a registration before returning. A
fresh members: :auto registry transiently rejects registrations (and :via
starts) with :process_not_registered_via until it converges; gating here keeps
test setup from racing that window. Production starts the registry in a
supervision tree (it is ready long before any session), so this gate is new/1
only.
Options
:name(atom/0) - The registry's name (default: a unique one).
Starts a unique Horde.Registry.
Options
:name(atom/0) - The registry's name, which is also its handle. The default value isNormandy.Behaviours.SessionRegistry.Horde.