Pure verdicts every hot-reload report is built from — computed from what actually happened, never asserted by construction.
A report that says :teardown/data-preserved? true because the skeleton was written that way, or :ok? false with no word about whether the addon is still running, answers the question the operator did not ask. These functions derive each claim from the outcomes the ports returned:
data-preserved? from the teardown outcomes that actually released remount-outcome which failed ids were put back, which are DOWN released-dirs which watched dirs no surviving addon still needs
Portable stratum: no reader conditionals, no host API, no effects.
Pure verdicts every hot-reload report is built from — computed from what actually happened, never asserted by construction. A report that says :teardown/data-preserved? true because the skeleton was written that way, or :ok? false with no word about whether the addon is still running, answers the question the operator did not ask. These functions derive each claim from the outcomes the ports returned: data-preserved? from the teardown outcomes that actually released remount-outcome which failed ids were put back, which are DOWN released-dirs which watched dirs no surviving addon still needs Portable stratum: no reader conditionals, no host API, no effects.
(data-preserved? outcomes)True when every teardown outcome that RELEASED something claims :teardown/data-preserved? true. An outcome that tore nothing down released nothing and cannot have deleted anything, so it does not count against the verdict; one that released without making the claim does — an unclaimed release is not evidence of preservation.
True when every teardown outcome that RELEASED something claims :teardown/data-preserved? true. An outcome that tore nothing down released nothing and cannot have deleted anything, so it does not count against the verdict; one that released without making the claim does — an unclaimed release is not evidence of preservation.
(dirs-outcome requested answers)Fold the answers to one remove-dirs! request per ejected owner into {:removed [dir] :retained [dir] :shared {dir [owner]} :reason string?}.
ANSWERS are each either a hive-hot RemoveDirsReport wrapped as {:ok report}, or an err Result {:error kw :message string} — then every dir of that request (REQUESTED, the same order as ANSWERS) is retained, with the message as the reason. A dir one request kept (another owner still claimed it) and a later one removed IS removed. :absent dirs were never watched and are neither.
Fold the answers to one remove-dirs! request per ejected owner into
{:removed [dir] :retained [dir] :shared {dir [owner]} :reason string?}.
ANSWERS are each either a hive-hot RemoveDirsReport wrapped as {:ok report},
or an err Result {:error kw :message string} — then every dir of that request
(REQUESTED, the same order as ANSWERS) is retained, with the message as the
reason. A dir one request kept (another owner still claimed it) and a later
one removed IS removed. :absent dirs were never watched and are neither.(released-dirs ejected-dirs remaining-dirs)The EJECTED addons' source dirs that no REMAINING addon still lives under, sorted. A dir two addons share stays watched while either is mounted.
The EJECTED addons' source dirs that no REMAINING addon still lives under, sorted. A dir two addons share stays watched while either is mounted.
(released? outcome)Did this teardown outcome release anything?
Did this teardown outcome release anything?
(remount-outcome ids mount-report)Partition the IDS a remount tore down by what the MountReport says became of them:
:hot/restored the new instance failed and the PREVIOUS one is live again :hot/down neither the new nor the previous instance is live
An id the report never attempted is down: it was torn down and nothing put anything back. :hot/restored? is present only when something failed, and is true exactly when nothing is down.
Restored is drawn from the FAILED ids only: an id whose new instance came up is up, whatever a stale :restored? on its row says. Counting it restored reported a healthy mount as a rollback (property counterexample: one row {:success? true :restored? true}).
Partition the IDS a remount tore down by what the MountReport says became of
them:
:hot/restored the new instance failed and the PREVIOUS one is live again
:hot/down neither the new nor the previous instance is live
An id the report never attempted is down: it was torn down and nothing put
anything back. :hot/restored? is present only when something failed, and is
true exactly when nothing is down.
Restored is drawn from the FAILED ids only: an id whose new instance came
up is up, whatever a stale :restored? on its row says. Counting it restored
reported a healthy mount as a rollback (property counterexample: one row
{:success? true :restored? true}).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 |