View Source Runbox.Runtime.Stage.UnitRegistry.AlternativeRegistry (runbox v17.1.0)
Module manages alternative registry state.
Every unit is registered only once per alternative registry. More than one unit can be registered with the same key.
Summary
Functions
Get registered unit ids
Returns new alternative registry
Registers unit in alternative reg with given key
Unregisters unit from alternative reg
Types
@type registration_key() :: term()
@type t() :: %{required(registration_key()) => [unit_id()]}
@type unit_id() :: term()
Functions
@spec lookup(t(), registration_key()) :: [unit_id()]
Get registered unit ids
Returns new alternative registry
@spec register_unit(t(), registration_key(), unit_id()) :: t()
Registers unit in alternative reg with given key
Unregisters unit from alternative reg