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

Link to this function

register_unit(alt_reg, key, unit_id)

View Source
@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)

View Source
@spec unregister_unit(t(), unit_id()) :: t()

Unregisters unit from alternative reg