Section and profile operations over a context:
{:engine IComposeEngine :runner IProgramRunner ; optional: host programs :settings Settings :state (atom {:active {id Active} :current id-or-nil}) :now (fn [] epoch-ms) :save! (fn [persisted-state] Result)} ; optional
A subject is a Profile: a configured preset (lookup) or a section resolved
from a target against the configured compose projects (resolve-target).
Every operation answers a Result (reap! and adopt! answer reports). The
active map changes only after the engine confirmed the action.
A section also holds the host programs paired with its services: they start once its containers are up and stop when the last section holding them is released. A program that fails to start is reported, never fatal.
Section and profile operations over a context:
{:engine IComposeEngine
:runner IProgramRunner ; optional: host programs
:settings Settings
:state (atom {:active {id Active} :current id-or-nil})
:now (fn [] epoch-ms)
:save! (fn [persisted-state] Result)} ; optional
A subject is a Profile: a configured preset (`lookup`) or a section resolved
from a target against the configured compose projects (`resolve-target`).
Every operation answers a Result (reap! and adopt! answer reports). The
active map changes only after the engine confirmed the action.
A section also holds the host programs paired with its services: they start
once its containers are up and stop when the last section holding them is
released. A program that fails to start is reported, never fatal.Recycling a section's services in place. Unlike down/stop, a restart takes nothing away from another active section that needs the service, so it runs even when the service is shared: a container whose process died inside (a dev server under a file watcher) is recycled through the tool instead of by hand.
Recycling a section's services in place. Unlike down/stop, a restart takes nothing away from another active section that needs the service, so it runs even when the service is shared: a container whose process died inside (a dev server under a file watcher) is recycled through the tool instead of by hand.
Swarm work on the sections the addon runs, over the ops context plus:
{:swarm ISwarm ; optional: live agents and notices :activity IActivity} ; optional: connections to local ports
Nothing here starts a JVM for an agent: routes point at the programs the sections run, so a swarm shares one nREPL per module instead of each agent booting its own.
Swarm work on the sections the addon runs, over the ops context plus:
{:swarm ISwarm ; optional: live agents and notices
:activity IActivity} ; optional: connections to local ports
* routes: which shared nREPL drives which module (a program directory).
* claims: an agent declares it works on a section; a claim keeps the
section alive while renewed, and ends after the claim TTL or when the
agent leaves the swarm.
* observe!: one pass of the reaper. It expires claims, counts as use the
claims that hold, the agents whose cwd lies in the section's project and
the connections newly opened to its nREPL (and, opt-in per project with
:project/activity, published) ports, the connections its own containers
hold to those left out, touches what is in use, records which source
counted (:usage :sources), marks a section whose last claim ended orphaned
(reaped after the shorter orphan TTL), and tells each agent once which
shared nREPL drives the module it works in.
Nothing here starts a JVM for an agent: routes point at the programs the
sections run, so a swarm shares one nREPL per module instead of each agent
booting its own.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 |