Liking cljdoc? Tell your friends :D

paclo.decode-ext

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.
raw docstring

apply!clj

(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.
sourceraw docstring

installedclj

(installed)

Return installed hook keys in execution order.

Return installed hook keys in execution order.
sourceraw docstring

register!clj

(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.
sourceraw docstring

unregister!clj

(unregister! k)

Remove a previously registered hook by key.

Remove a previously registered hook by key.
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