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.
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.
(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]})Re-read config and profiles file into the running context, keeping the active map. Result<{:profiles n}>.
Re-read config and profiles file into the running context, keeping the
active map. Result<{:profiles n}>.(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 |