IAddon hive.compose. Construction is pure. initialize! reads the config
and profiles file, loads the active map and starts the reaper; shutdown!
stops the reaper. Containers and host programs are never touched by the
lifecycle itself.
The reaper is one daemon thread waking every :compose/tick-seconds. Its first
pass adopts running stacks of configured profiles (when :compose/adopt?);
every pass forgets profiles taken down outside the addon and releases the ones
idle past their TTL.
Config: see hive-compose.promote.config. :compose/engine injects an
IComposeEngine in place of the docker CLI, :compose/runner an
IProgramRunner in place of the host one, :compose/resolver the
{scheme ISecretBackend} env references are read through in place of pass.
IAddon `hive.compose`. Construction is pure. `initialize!` reads the config
and profiles file, loads the active map and starts the reaper; `shutdown!`
stops the reaper. Containers and host programs are never touched by the
lifecycle itself.
The reaper is one daemon thread waking every `:compose/tick-seconds`. Its first
pass adopts running stacks of configured profiles (when `:compose/adopt?`);
every pass forgets profiles taken down outside the addon and releases the ones
idle past their TTL.
Config: see `hive-compose.promote.config`. `:compose/engine` injects an
IComposeEngine in place of the docker CLI, `:compose/runner` an
IProgramRunner in place of the host one, `:compose/resolver` the
{scheme ISecretBackend} env references are read through in place of `pass`.(addon-ctor config)hive-addon.mount constructor: config -> uninitialized IAddon.
hive-addon.mount constructor: config -> uninitialized IAddon.
One line per command: what it does and the params it reads.
One line per command: what it does and the params it reads.
(make-addon)(make-addon seed)Uninitialized IAddon. No thread, file or container is touched.
Uninitialized IAddon. No thread, file or container is touched.
(reload! {:keys [state seed]})Re-read the addon config block declared now and the profiles file into the running context, keeping the active map; the engine and program runner are rebuilt from the new config. Answers Result<report>: :source (where the block came from), :profiles and :projects (ids now), :changed (projects, profiles and settings that differ, by id or key, never by value), :sections (active sections re-based on their changed project: :rebased ids, :kept with why) and :not-reloaded (what applies only at the next initialize!, and that running containers keep the env they were created with until recreated).
Re-read the addon config block declared now and the profiles file into the running context, keeping the active map; the engine and program runner are rebuilt from the new config. Answers Result<report>: :source (where the block came from), :profiles and :projects (ids now), :changed (projects, profiles and settings that differ, by id or key, never by value), :sections (active sections re-based on their changed project: :rebased ids, :kept with why) and :not-reloaded (what applies only at the next initialize!, and that running containers keep the env they were created with until recreated).
(tick! {:keys [state]})One reaper pass on the calling thread: adopt once, then reap. Answers the pass, or {:skipped ..} when not active or a pass is running.
One reaper pass on the calling thread: adopt once, then reap. Answers the
pass, or {:skipped ..} when not active or a pass is running.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |