Liking cljdoc? Tell your friends :D

hive-system.events.system

Event-driven system operations.

Registers event handlers for shell execution, tool checking, and process lifecycle. Each handler returns a Result in the effects map, which the journal interceptor persists.

Init: (init!) ;; default — no journal (init! {:journal-fn record!}) ;; with IJournal callback

Dispatch: (dispatch [:sys/exec "ls -la"]) (dispatch [:sys/exec ["rg" "pattern" "src/"]]) (dispatch [:sys/exec-ok "make test"]) (dispatch [:sys/which "rg"]) (dispatch [:sys/require-tool :ripgrep]) (dispatch [:sys/require-tools [:ripgrep :fd :jq]])

All handlers return {:result (ok ...) or (err ...)} in effects. The timing interceptor adds :_duration-ms. The journal interceptor persists to IJournal if configured.

Event-driven system operations.

Registers event handlers for shell execution, tool checking,
and process lifecycle. Each handler returns a Result in the
effects map, which the journal interceptor persists.

Init:
  (init!)                        ;; default — no journal
  (init! {:journal-fn record!})  ;; with IJournal callback

Dispatch:
  (dispatch [:sys/exec "ls -la"])
  (dispatch [:sys/exec ["rg" "pattern" "src/"]])
  (dispatch [:sys/exec-ok "make test"])
  (dispatch [:sys/which "rg"])
  (dispatch [:sys/require-tool :ripgrep])
  (dispatch [:sys/require-tools [:ripgrep :fd :jq]])

All handlers return {:result (ok ...) or (err ...)} in effects.
The timing interceptor adds :_duration-ms.
The journal interceptor persists to IJournal if configured.
raw docstring

dispatch-resultclj

(dispatch-result event)

Dispatch synchronously and extract the :result from effects. Returns the Result (ok/err) directly.

Dispatch synchronously and extract the :result from effects.
Returns the Result (ok/err) directly.
sourceraw docstring

init!clj

(init!)
(init! {:keys [journal-fn db]})

Initialize the event-driven system layer.

Opts: :journal-fn — (fn [op-map]) callback for IJournal recording. op-map: {:op-type :input :output :duration-ms :success?} :db — initial app-db atom (default: fresh atom)

Initialize the event-driven system layer.

Opts:
  :journal-fn — (fn [op-map]) callback for IJournal recording.
                op-map: {:op-type :input :output :duration-ms :success?}
  :db         — initial app-db atom (default: fresh atom)
sourceraw docstring

shutdown!clj

(shutdown!)

Stop the event processing loop and reset state.

Stop the event processing loop and reset state.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close