Pure: who works on what a section runs, which shared nREPL drives which module, and whether a section is in use.
Agents are {:agent/id :agent/status :agent/cwd}. A claim is what an agent declared itself, kept on the active entry under :claims {agent-id {:since ms :seen ms :note s :swarm? bool}}. A route is one program with an nREPL: {:dir :program/id :project :nrepl-port ..}.
Pure: who works on what a section runs, which shared nREPL drives which
module, and whether a section is in use.
Agents are {:agent/id :agent/status :agent/cwd}. A claim is what an agent
declared itself, kept on the active entry under :claims
{agent-id {:since ms :seen ms :note s :swarm? bool}}. A route is one
program with an nREPL: {:dir :program/id :project :nrepl-port ..}.(agents-in agents dirs)The agents of agents whose cwd lies under one of dirs, by id.
The agents of `agents` whose cwd lies under one of `dirs`, by id.
(best-route routes path)The route of routes whose :dir holds path most closely (the deepest
directory), nil when none does.
The route of `routes` whose :dir holds `path` most closely (the deepest directory), nil when none does.
(claim claims agent now {:keys [note swarm?]})claims with agent claiming at now. A renewed claim keeps its :since,
and its note unless a new one is given.
`claims` with `agent` claiming at `now`. A renewed claim keeps its :since, and its note unless a new one is given.
(clean-dir dir)dir normalized: . and .. segments resolved lexically (no filesystem
read, links untouched) and no trailing slash ("/" stays itself); nil
when blank. A configured dir like dc/../../wt/app and an agent's cwd
/wt/app/src then compare as the same tree.
`dir` normalized: `.` and `..` segments resolved lexically (no filesystem
read, links untouched) and no trailing slash ("/" stays itself); nil
when blank. A configured dir like `dc/../../wt/app` and an agent's cwd
`/wt/app/src` then compare as the same tree.(concerned agents claimants)The agents a section's notices concern: agents (those working in its
project's directories) and the claimants (agent ids holding a claim on
it), distinct and sorted by id. A claimant the swarm does not list stands
as {:agent/id id}.
The agents a section's notices concern: `agents` (those working in its
project's directories) and the `claimants` (agent ids holding a claim on
it), distinct and sorted by id. A claimant the swarm does not list stands
as {:agent/id id}.(expired-claims claims live now ttl-ms){agent reason} of the claims in claims that no longer hold at now:
:gone when the agent was in the swarm when it claimed and the swarm
(live, a set of ids; nil when no swarm answers) no longer lists it,
:stale when not renewed for ttl-ms.
{agent reason} of the claims in `claims` that no longer hold at `now`:
:gone when the agent was in the swarm when it claimed and the swarm
(`live`, a set of ids; nil when no swarm answers) no longer lists it,
:stale when not renewed for `ttl-ms`.(fresh-peers before now){port #{peer}} of now absent from before: connections opened since the
last look. A long-lived connection (a pool, an editor left attached)
counts once, when first seen.
{port #{peer}} of `now` absent from `before`: connections opened since the
last look. A long-lived connection (a pool, an editor left attached)
counts once, when first seen.(notices working routes-by-section told)[{:agent id :section id :routes [route]}] for the agents of working
({section-id [agent]}) not yet told about that section (told, a set of
[agent-id section-id]), when the section has a ready route to tell.
[{:agent id :section id :routes [route]}] for the agents of `working`
({section-id [agent]}) not yet told about that section (`told`, a set of
[agent-id section-id]), when the section has a ready route to tell.(peer-host peer)The address of peer ("ip:port", or "[ip6]:port"), nil when it has no port.
The address of `peer` ("ip:port", or "[ip6]:port"), nil when it has no port.
(project-dirs proj)The directories a configured project's work happens in: its own and those of its programs, sorted, distinct.
The directories a configured project's work happens in: its own and those of its programs, sorted, distinct.
(published-peers? fresh ports)True when fresh ({port #{peer}}) holds a peer on a port ports ({port
source}) marks :published: only then is it worth asking who the project's
own containers are.
True when `fresh` ({port #{peer}}) holds a peer on a port `ports` ({port
source}) marks :published: only then is it worth asking who the project's
own containers are.(route-advice {:keys [dir nrepl-port nrepl-ready? running? project] :as route})One line telling an agent how to drive the module of route.
One line telling an agent how to drive the module of `route`.
(section-fresh fresh ports own)The fresh peers ({port #{peer}}) of a section watching ports ({port
source}): those on its ports, with the peers its own containers hold
(addresses own) left out on its :published ones, where a container's
pool to a sibling's port would otherwise look like use.
The fresh peers ({port #{peer}}) of a section watching `ports` ({port
source}): those on its ports, with the peers its own containers hold
(addresses `own`) left out on its :published ones, where a container's
pool to a sibling's port would otherwise look like use.(under? dir path)True when path is dir or lies below it.
True when `path` is `dir` or lies below it.
(usage {:keys [claims agents fresh sources]}){:in-use? bool :by [reason] :sources [source]} of an active section from
what one pass saw: claims still holding, agents working in its
project's directories and fresh ({port #{peer}}) connections opened to
its ports since the last pass, each port's source (:nrepl, :published)
given by sources ({port source}). A reason is {:claim agent}, {:agent id}
or {:port p :peers n :source s}; :sources names, in that order and once
each, what the reasons came from: :claim, :agent, or a port's source
(:port when sources does not name it).
{:in-use? bool :by [reason] :sources [source]} of an active section from
what one pass saw: `claims` still holding, `agents` working in its
project's directories and `fresh` ({port #{peer}}) connections opened to
its ports since the last pass, each port's source (:nrepl, :published)
given by `sources` ({port source}). A reason is {:claim agent}, {:agent id}
or {:port p :peers n :source s}; :sources names, in that order and once
each, what the reasons came from: :claim, :agent, or a port's source
(:port when `sources` does not name it).(without-hosts peers hosts){port #{peer}} of peers with the peers whose address is one of hosts
left out, and the ports left with none dropped. The connections a
project's own containers hold to its published ports are not its use.
{port #{peer}} of `peers` with the peers whose address is one of `hosts`
left out, and the ports left with none dropped. The connections a
project's own containers hold to its published ports are not its use.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 |