The host's settings for the Dyn layer, config :rho, :dyn, [...] (see
Rho.Dyn). Every key has a default; a host that doesn't use Dyn sets
none of them.
:enabled:Rho.Supervisorstarts the Dyn processes (the Keeper and the approval store), adds thedyn_*tools to the registry's core tools andRho.Dyn.Sourceto its sources. Defaultfalse;Rho.Supervisor's:dynoption overrides it.:namespace: the module namespace the agent writes in (defmodule Dyn.Weather), compiled as<namespace>.G<n>.*. DefaultDyn. Fixed for an install: generations on disk name it. It may be below a Core prefix (Operator'sOperator.Dyn, belowOperator), but not belowRho(rho's own modules live there), nor at or above a Core prefix (the Core's modules would count as Dyn code and drop out of the runtime digest):Rho.Dyn.Keeperrefuses to start then (validate!/0).:app: the host's OTP application. Its version and modules are part of the Core (Rho.Dyn.Compiler.runtime/0: a new Core rebuilds every generation). Defaultnil(rho's own only).:core: the host's own module prefixes ([MyApp]): its Core code, in the runtime digest and off limits to Dyn code except:allowed.Rhois always one. Default[].:allowed: Core modules Dyn code may call ([MyApp.Files]).Rho.Toolis always one. Default[].:check: the static check's lists, merged over its defaults (Rho.Dyn.Check.defaults/0: Operator's, except the entries naming Operator's own code)::banned(%{module => why}),:banned_erlang(%{atom => why}),:partial(%{module => [function]}: allowed modules with forbidden functions),:gated(%{prefix => [module]}: only those modules below the prefix),:forging(%{atom => why}: atoms Dyn code may not hold),:sigils(%{sigil_atom => module}: template sigils whose expressions are code, expanded by that module's macro before the check),:handlers([{module, function, arity, index}]: calls whose argumentindexis a{Module, :function}handler run later, checked as a call). Anilvalue drops a default entry.:screens: the host's screen integration, aRho.Dyn.Screensmodule. DefaultRho.Dyn.Screens.None(no screens: the first "render" is the boot); a mob app setsRho.Dyn.Screens.Mob.:guide: text appended toRho.Dyn.agent_guide/0(the host's own rules: its file roots, a menu Dyn code adds rows to, ...), a string or an MFA / 0-arity function. Default none.- The Keeper's options (
Rho.Dyn.Keeper)::approval,:probation_ms,:crash_limit,:on_stable, ...
Summary
Functions
The Core modules Dyn code may call, as written.
The host's OTP application (:app), or nil.
The :check overrides as given (Rho.Dyn.Check merges them over its defaults).
The Core's module prefixes as written (["Rho", "MyApp"]).
Is :enabled set to true?
The prefix of generation n's module names, as atoms print ("Elixir.Dyn.G3.").
The whole config :rho, :dyn keyword list ([] when unset).
The :guide text, resolved; nil when unset.
A module as written: MyApp.Files and "MyApp.Files" are "MyApp.Files".
The namespace module (Dyn by default).
The namespace as written ("Dyn", "MyApp.Dyn").
The namespace's alias segments ([:MyApp, :Dyn]).
The :screens module (Rho.Dyn.Screens.None by default).
Is name (as written) prefix or below it?
Raises ArgumentError if the namespace is below Rho, or is a Core
prefix or above one (see :namespace).
Functions
@spec allowed() :: [String.t()]
The Core modules Dyn code may call, as written.
@spec app() :: atom() | nil
The host's OTP application (:app), or nil.
@spec check() :: keyword()
The :check overrides as given (Rho.Dyn.Check merges them over its defaults).
@spec core() :: [String.t()]
The Core's module prefixes as written (["Rho", "MyApp"]).
@spec enabled?() :: boolean()
Is :enabled set to true?
@spec generation_prefix(non_neg_integer()) :: String.t()
The prefix of generation n's module names, as atoms print ("Elixir.Dyn.G3.").
@spec get() :: keyword()
The whole config :rho, :dyn keyword list ([] when unset).
@spec guide() :: String.t() | nil
The :guide text, resolved; nil when unset.
A module as written: MyApp.Files and "MyApp.Files" are "MyApp.Files".
@spec namespace() :: module()
The namespace module (Dyn by default).
@spec namespace_name() :: String.t()
The namespace as written ("Dyn", "MyApp.Dyn").
@spec namespace_segments() :: [atom()]
The namespace's alias segments ([:MyApp, :Dyn]).
@spec screens() :: module()
The :screens module (Rho.Dyn.Screens.None by default).
Is name (as written) prefix or below it?
@spec validate!() :: :ok
Raises ArgumentError if the namespace is below Rho, or is a Core
prefix or above one (see :namespace).