IComposeEngine over the docker compose CLI. Argv construction and output
parsing are pure; the process runs through an injected exec with
hive-system's shell.core/exec! contract (argv, opts) -> Result.
Secret references in a profile's env are read only by the calls that create
containers (up, a recreating restart), through the injected resolver
(see hive-compose.adapter.secrets). Every other call is given their
renderings, so it interpolates and reads no store.
IComposeEngine over the docker compose CLI. Argv construction and output parsing are pure; the process runs through an injected `exec` with hive-system's `shell.core/exec!` contract (argv, opts) -> Result. Secret references in a profile's env are read only by the calls that create containers (`up`, a recreating `restart`), through the injected resolver (see `hive-compose.adapter.secrets`). Every other call is given their renderings, so it interpolates and reads no store.
IProgramRunner over the host: processes through hive-system (process.core
spawns, process.liveness answers for a pid, shell.core/exec! signals),
build files through EDN reads.
A program starts as sh -c 'exec setsid <command> >> <log> 2>&1': the shell
replaces itself with the program in a session of its own, so the spawned pid
is the program's and its process group's. The group is what -stop!
signals, which reaches the JVMs and node processes a watch forks. The pid is
all that is kept, so a program outlives the addon and is stopped by pid after
a restart.
Secret references in :program/env are read at -start! through the
injected resolver (see hive-compose.adapter.secrets) and handed to the
process only; nothing kept about a program carries them.
IProgramRunner over the host: processes through hive-system (`process.core` spawns, `process.liveness` answers for a pid, `shell.core/exec!` signals), build files through EDN reads. A program starts as `sh -c 'exec setsid <command> >> <log> 2>&1'`: the shell replaces itself with the program in a session of its own, so the spawned pid is the program's and its process group's. The group is what `-stop!` signals, which reaches the JVMs and node processes a watch forks. The pid is all that is kept, so a program outlives the addon and is stopped by pid after a restart. Secret references in `:program/env` are read at `-start!` through the injected resolver (see `hive-compose.adapter.secrets`) and handed to the process only; nothing kept about a program carries them.
IActivity over Linux /proc/net/tcp and /proc/net/tcp6: the remote endpoints of the connections accepted on a local port. Parsing is pure; reading the two files is the only effect, and a file that cannot be read contributes nothing (another OS answers no peers, never an error).
IActivity over Linux /proc/net/tcp and /proc/net/tcp6: the remote endpoints of the connections accepted on a local port. Parsing is pure; reading the two files is the only effect, and a file that cannot be read contributes nothing (another OS answers no peers, never an error).
Secret references read from their stores at spawn. The port is hive-system's
ISecretBackend; a resolver is {scheme backend}, one backend per scheme a
reference may name. :pass is hive-system's PassBackend: pass <path>
through the injected exec, its first non-blank line, trimmed.
A failure names the variable, the reference and the store's reason, never a
value. A new scheme ({:env "VAR"}) is a backend of that id here and a map
in hive-compose.schema/SecretRef.
Secret references read from their stores at spawn. The port is hive-system's
`ISecretBackend`; a resolver is {scheme backend}, one backend per scheme a
reference may name. `:pass` is hive-system's PassBackend: `pass <path>`
through the injected `exec`, its first non-blank line, trimmed.
A failure names the variable, the reference and the store's reason, never a
value. A new scheme (`{:env "VAR"}`) is a backend of that id here and a map
in `hive-compose.schema/SecretRef`.ISwarm over the hive host: the live agents come from the host's swarm
registry, notices go out as hivemind messages. A notice addressed to one
agent (:to) is sent directed, through the host's routing-verdict shout,
so it lands in that agent's context only; with no directed channel it
falls back to the plain shout. Everything is soft-resolved, so the
published addon never requires hive-mcp; with no host, -agents answers
:host/absent and -notify! an error, and the addon runs on claims and
connections alone.
A delivered notice answers {:channel :direct|:broadcast ..}: :direct with the :to it reached (and the host's :context-id, :to-unresolved when the host knows no such reader), :broadcast when it went out as a shout, :fallback? true when it was meant for one agent but no directed channel resolved.
ISwarm over the hive host: the live agents come from the host's swarm
registry, notices go out as hivemind messages. A notice addressed to one
agent (:to) is sent directed, through the host's routing-verdict shout,
so it lands in that agent's context only; with no directed channel it
falls back to the plain shout. Everything is soft-resolved, so the
published addon never requires hive-mcp; with no host, `-agents` answers
:host/absent and `-notify!` an error, and the addon runs on claims and
connections alone.
A delivered notice answers {:channel :direct|:broadcast ..}: :direct with
the :to it reached (and the host's :context-id, :to-unresolved when the
host knows no such reader), :broadcast when it went out as a shout,
:fallback? true when it was meant for one agent but no directed channel
resolved.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 |