Liking cljdoc? Tell your friends :D

defn-typed.malli-in-prod

malli instrumentation, at run time, of the functions whose defmeta carries :malli-in-prod, in any build, production included. Require this namespace once at the app's entry point: it brings malli into the build and installs the checker; without it an opted-in function runs unchecked and prints one line saying so. The check never changes a call's result and never throws into the caller; a violation reaches the handler (on-malli-violation!) off the call path, at most one event per function and failing-path set per 60 s.

malli instrumentation, at run time, of the functions whose `defmeta` carries `:malli-in-prod`,
in any build, production included. Require this namespace once at the app's entry point: it
brings malli into the build and installs the checker; without it an opted-in function runs
unchecked and prints one line saying so. The check never changes a call's result and never
throws into the caller; a violation reaches the handler (`on-malli-violation!`) off the call
path, at most one event per function and failing-path set per 60 s.
raw docstring

*now-ms*clj/s

The clock of :at and the dedupe window: a fn of no args returning epoch milliseconds.

The clock of `:at` and the dedupe window: a fn of no args returning epoch milliseconds.
sourceraw docstring

*random*clj/s

The draw a :sampled call is checked by: a fn of no args returning a number in [0, 1).

The draw a `:sample`d call is checked by: a fn of no args returning a number in [0, 1).
sourceraw docstring

checkerclj/s

(checker {:keys [input output opts] :as spec})

The checker of a :malli-in-prod function from its slot's spec {:fn :input :output :opts}: the validators compiled once, the explainers on the first violation; :check! never throws.

The checker of a `:malli-in-prod` function from its slot's spec {:fn :input :output :opts}: the
validators compiled once, the explainers on the first violation; `:check!` never throws.
sourceraw docstring

on-malli-violation!clj/s

(on-malli-violation! handler-fn)

Registers handler, a fn of one event map {:fn :direction :value :errors :schema :stack :at :repeats}, for every :malli-in-prod function; nil unregisters (each event then prints one stderr line). Returns handler.

Registers handler, a fn of one event map {:fn :direction :value :errors :schema :stack :at
:repeats}, for every `:malli-in-prod` function; nil unregisters (each event then prints one
stderr line). Returns handler.
sourceraw docstring

redactclj/s

(redact ks value)

value with the keys in ks removed from every map inside it, at any depth.

value with the keys in ks removed from every map inside it, at any depth.
sourceraw docstring

stack-depthclj/s

Frames kept in :stack: the calling code is within the first few, the rest is framework noise.

Frames kept in `:stack`: the calling code is within the first few, the rest is framework noise.
sourceraw docstring

window-msclj/s

One event per function, direction and failing-path set per window; the later violations in it are counted into the next event's :repeats. It keeps a hot path failing on every call from flooding the handler.

One event per function, direction and failing-path set per window; the later violations in it
are counted into the next event's `:repeats`. It keeps a hot path failing on every call from
flooding the handler.
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