Pure functions for config diffing, dependency analysis, and formatting. FC/IS: no I/O, no logging.
Pure functions for config diffing, dependency analysis, and formatting. FC/IS: no I/O, no logging.
(affected-components diff)Given a config diff, return the set of component keys that would restart.
Given a config diff, return the set of component keys that would restart.
(config-diff old-config new-config)Compute diff between two config maps. Returns {:changed {key {:old v1 :new v2}} :added {key val} :removed {key val}}.
Compute diff between two config maps.
Returns {:changed {key {:old v1 :new v2}} :added {key val} :removed {key val}}.(contains-refs? v)Check if a config value contains any ig/ref instances.
Check if a config value contains any ig/ref instances.
(format-config-tree cfg)(format-config-tree cfg indent)Format a config map as an indented string tree for display.
Format a config map as an indented string tree for display.
(format-edn x)x pretty-printed for the editor. Anything that is not a collection
(#inst, #uuid, a tagged literal) prints as pr-str prints it.
`x` pretty-printed for the editor. Anything that is not a collection (#inst, #uuid, a tagged literal) prints as pr-str prints it.
(redact-secrets m)Recursively replace values of sensitive keys with "********".
Recursively replace values of sensitive keys with "********".
(restore-refs v)Restore :integrant.ref/* placeholders back to ig/ref values. Decodes the full qualified key preserved by strip-refs.
Restore :integrant.ref/* placeholders back to ig/ref values. Decodes the full qualified key preserved by strip-refs.
(restore-unreadable original edited)Put back into edited what strip-unreadable hid from original, so
saving a section does not drop its functions. A wholly hidden original
comes back unchanged.
Put back into `edited` what strip-unreadable hid from `original`, so saving a section does not drop its functions. A wholly hidden `original` comes back unchanged.
(strip-refs v)Replace ig/ref values with a keyword placeholder for serialization. Encodes the full qualified key (namespace + name) so restore-refs can round-trip refs with any namespace, not just :wagoe/*. Other records, an ig/refset among them, are left whole: rebuilt as a plain map they would be written back as one.
Replace ig/ref values with a keyword placeholder for serialization. Encodes the full qualified key (namespace + name) so restore-refs can round-trip refs with any namespace, not just :wagoe/*. Other records, an ig/refset among them, are left whole: rebuilt as a plain map they would be written back as one.
(strip-unreadable v)v without the map entries EDN cannot represent — a function, a live
object — so the editor shows what it can round-trip. Returns
{:value v' :hidden [path ...]}; :value is nil when v itself is
unreadable. ig/refs come back as strip-refs placeholders.
`v` without the map entries EDN cannot represent — a function, a live
object — so the editor shows what it can round-trip. Returns
`{:value v' :hidden [path ...]}`; :value is nil when `v` itself is
unreadable. ig/refs come back as strip-refs placeholders.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 |