Runbox.Runtime.Stage.UnitRegistry.AlternativeRegistry (runbox v1.2.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.
Link to this section Summary
Functions
Get registered unit ids
Returns new alternative registry
Registers unit in alternative reg with given key
Unregisters unit from alternative reg
Link to this section Types
Link to this type
registration_key()
@type registration_key() :: term()
@type t() :: %{required(registration_key()) => [unit_id()]}
Link to this type
unit_id()
@type unit_id() :: term()
Link to this section Functions
Link to this function
lookup(alt_reg, key)
@spec lookup(t(), registration_key()) :: [unit_id()]
Get registered unit ids
Link to this function
new()
Returns new alternative registry
Link to this function
register_unit(alt_reg, key, unit_id)
@spec register_unit(t(), registration_key(), unit_id()) :: t()
Registers unit in alternative reg with given key
Link to this function
unregister_unit(alt_reg, unit_id)
Unregisters unit from alternative reg