Reads the Dyn registry: one ETS table owned (and only written) by
Rho.Dyn.Keeper, named like the Keeper. It maps logical names
to the current generation's modules:
{:tool, "weather"}(a tool'sRho.Tool.name/0),{:screen, "Notes"}(the module name belowDyn.),{:module, "Helpers"}(anything else).
The whole mapping is one row, {:generation, n, entries}, so a switch
of generations is a single insert: a reader sees the old set or the new
one, never a mix. Other rows: {:mode, :booting | :normal | :safe},
{:rebuilding, n} while the launch rebuilds generation n for a new
Core in the background (its entries are empty until it loads), and
{:config, map} (the Keeper's data dir and options, for
Rho.Dyn).
Every read takes the table (the Keeper's name, Rho.Dyn.Keeper for the
app's) and answers sensibly while no Keeper runs (no Dyn layer).
Rho.Dyn wraps the common reads with the app's Keeper as default.
Summary
Functions
The current generation's {name, module} of kind, sorted by name.
The Keeper's config: :dir (its data dir, Rho.Dyn.Store's root),
:keeper, :approval, :build and :rebuild_timeout_ms;
{:error, :not_running} without a Keeper.
The current generation's whole mapping, %{key => module} (empty when none).
The current generation's number; 0 when none is loaded.
The current generation's module for key; :error when it has none.
The Keeper's mode: :booting, :normal, :safe (no Dyn code loaded), or :off (no Keeper).
The generation this launch is rebuilding for a new Core, or nil.
Types
@type key() :: {:tool | :screen | :module, String.t()}
Functions
The current generation's {name, module} of kind, sorted by name.
The Keeper's config: :dir (its data dir, Rho.Dyn.Store's root),
:keeper, :approval, :build and :rebuild_timeout_ms;
{:error, :not_running} without a Keeper.
The current generation's whole mapping, %{key => module} (empty when none).
@spec generation(atom()) :: non_neg_integer()
The current generation's number; 0 when none is loaded.
The current generation's module for key; :error when it has none.
@spec mode(atom()) :: :off | :booting | :normal | :safe
The Keeper's mode: :booting, :normal, :safe (no Dyn code loaded), or :off (no Keeper).
@spec rebuilding(atom()) :: pos_integer() | nil
The generation this launch is rebuilding for a new Core, or nil.