Public post-decode hook registry.
Hooks are applied to packet maps after decode and are intentionally isolated: failures in one hook do not stop packet processing.
Public post-decode hook registry. Hooks are applied to packet maps after decode and are intentionally isolated: failures in one hook do not stop packet processing.
(apply! m)(apply! m extensions)(apply! m extensions error-mode)Apply post-decode functions to packet map m.
One argument consults current global hooks. Two arguments select only the supplied functions, including duplicates; an empty collection disables hooks. Both arities ignore exceptions and non-map results, preserving the last map. The third arity accepts :ignore or :report; nil extensions there selects global hooks. :report appends EDN diagnostics with zero-based execution indices. Later hooks continue. Core validates options at pipeline construction.
Functions are skipped unless m contains :decoded and lacks :decode-error.
Apply post-decode functions to packet map `m`. One argument consults current global hooks. Two arguments select only the supplied functions, including duplicates; an empty collection disables hooks. Both arities ignore exceptions and non-map results, preserving the last map. The third arity accepts :ignore or :report; nil extensions there selects global hooks. :report appends EDN diagnostics with zero-based execution indices. Later hooks continue. Core validates options at pipeline construction. Functions are skipped unless `m` contains :decoded and lacks :decode-error.
(installed)Return installed hook keys in execution order.
Return installed hook keys in execution order.
(register! k f)Register hook f under key k.
f has shape (fn [m] m') where m is a packet map.
Re-registering k overwrites the previous hook and moves it to the tail.
Register hook `f` under key `k`. `f` has shape `(fn [m] m')` where `m` is a packet map. Re-registering `k` overwrites the previous hook and moves it to the tail.
(unregister! k)Remove a previously registered hook by key.
Remove a previously registered hook by key.
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 |