Liking cljdoc? Tell your friends :D

hive-system.events.interceptors

Reusable interceptors for system operations.

  • timing: Measures wall-clock duration, injects into effects
  • journal: Records operation to IJournal after execution
  • tool-check: Validates binary exists before shell exec
  • result-lift: Converts raw handler return into Result-typed effect

All interceptors follow the re-frame context model: {:coeffects {:event [...] :db ...} :effects {...}}

Reusable interceptors for system operations.

- timing:      Measures wall-clock duration, injects into effects
- journal:     Records operation to IJournal after execution
- tool-check:  Validates binary exists before shell exec
- result-lift: Converts raw handler return into Result-typed effect

All interceptors follow the re-frame context model:
{:coeffects {:event [...] :db ...} :effects {...}}
raw docstring

emitclj

After handler completes, dispatches a completion event if :emit is in effects. Enables event chaining: handler returns {:result ... :emit [:next-event data]}

After handler completes, dispatches a completion event if :emit is in effects.
Enables event chaining: handler returns {:result ... :emit [:next-event data]}
sourceraw docstring

journalclj

Records the operation to IJournal after execution. Reads :journal-fn from coeffects (injected at init). Captures: event type, input, output, duration, success.

Records the operation to IJournal after execution.
Reads :journal-fn from coeffects (injected at init).
Captures: event type, input, output, duration, success.
sourceraw docstring

standardclj

Standard interceptor chain for system operations. Timing → Journal → Emit (applied in order).

Standard interceptor chain for system operations.
Timing → Journal → Emit (applied in order).
sourceraw docstring

timingclj

Measures wall-clock duration of the handler phase. Injects :duration-ms into the effects map on :after.

Measures wall-clock duration of the handler phase.
Injects :duration-ms into the effects map on :after.
sourceraw docstring

tool-checkclj

(tool-check)
(tool-check extract-bin-fn)

Interceptor that verifies a binary exists before execution. If the binary is not found, short-circuits with an err Result containing install hints.

Usage: (reg-event-fx :shell/exec [(tool-check :cmd-extractor-fn)] handler)

The extract-fn receives the event and returns the binary name to check. Defaults to extracting from the first arg if it's a vector command.

Interceptor that verifies a binary exists before execution.
If the binary is not found, short-circuits with an err Result
containing install hints.

Usage:
  (reg-event-fx :shell/exec
    [(tool-check :cmd-extractor-fn)]
    handler)

The extract-fn receives the event and returns the binary name to check.
Defaults to extracting from the first arg if it's a vector command.
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