Facade: discover a runtime, plan an intent, run it there, verify the effect.
(def rt (runtime/process-runtime {:id :rbash :argv ["/usr/bin/bash" "-r" "-c"] :env {...}})) (def prof (discover! rt)) (plan prof :sh [:write-file {:path "/tmp/x" :content "hi"}]) (realize! rt prof [:write-file {:path "/tmp/x" :content "hi"}])
Facade: discover a runtime, plan an intent, run it there, verify the effect.
(def rt (runtime/process-runtime {:id :rbash :argv ["/usr/bin/bash" "-r" "-c"] :env {...}}))
(def prof (discover! rt))
(plan prof :sh [:write-file {:path "/tmp/x" :content "hi"}])
(realize! rt prof [:write-file {:path "/tmp/x" :content "hi"}])(discover! runtime)Probe runtime and return its evidence-backed profile.
Probe runtime and return its evidence-backed profile.
(env profile)(env profile opts)Planning environment with the built-in registry. opts pass through to grammar.solve/make-env (e.g. :admit).
Planning environment with the built-in registry. opts pass through to grammar.solve/make-env (e.g. :admit).
(plan profile lang intent)(plan profile lang intent opts)Pure: choose a realization of intent in lang under profile.
Pure: choose a realization of intent in lang under profile.
(realize! runtime profile intent)(realize! runtime profile intent opts)Plan intent for runtime's language under profile, execute it, verify it. A non-:ok plan is returned unchanged: nothing is run.
Plan intent for runtime's language under profile, execute it, verify it. A non-:ok plan is returned unchanged: nothing is run.
(verify [op arg :as _intent] run)Check the observable effect of intent against what the run produced.
Check the observable effect of intent against what the run produced.
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 |