The two files the addon reads and writes: the profiles file and the state file holding the active map.
The two files the addon reads and writes: the profiles file and the state file holding the active map.
(load-state path)Result<{:active .. :current ..}> from the state file at path.
Result<{:active .. :current ..}> from the state file at `path`.
(path-state path)The filesystem's answer for path (the preflight's existence port,
hive-compose.promote.config/Exists): :present, :missing, or :unknown
when it cannot tell (permission denied, an IO or security error). Never
throws.
The filesystem's answer for `path` (the preflight's existence port, `hive-compose.promote.config/Exists`): :present, :missing, or :unknown when it cannot tell (permission denied, an IO or security error). Never throws.
(read-lock path)Result<Lock-or-nil> from the stack lockfile at path
(hive-compose.promote.stack/lock-path); nil when there is none.
Result<Lock-or-nil> from the stack lockfile at `path` (hive-compose.promote.stack/lock-path); nil when there is none.
(read-profiles path)Result<profiles-or-nil> from the EDN profiles file at path.
Result<profiles-or-nil> from the EDN profiles file at `path`.
(save-state! path st)Write st to path through a sibling temp file and an atomic move.
Result<path>.
Write `st` to `path` through a sibling temp file and an atomic move. Result<path>.
(sync-state! path base state)Merge the live state with the file at path and write the merge.
state is the live atom, base an atom holding what this instance last
read or wrote. What the file gained since base lands in state too, so a
second instance sharing the file (a hot remount) keeps its writes and so do
we. An unreadable file counts as unchanged since base, so it is
overwritten as before. Locked per path within the JVM. Result<merged>.
Merge the live state with the file at `path` and write the merge. `state` is the live atom, `base` an atom holding what this instance last read or wrote. What the file gained since `base` lands in `state` too, so a second instance sharing the file (a hot remount) keeps its writes and so do we. An unreadable file counts as unchanged since `base`, so it is overwritten as before. Locked per path within the JVM. Result<merged>.
(write-lock! path lock)Write lockfile value lock (hive-compose.promote.stack/lock) to path
atomically, creating its directory. Result<path>.
Write lockfile value `lock` (hive-compose.promote.stack/lock) to `path` atomically, creating its directory. Result<path>.
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 |