(prepare-nexus nexus request respond raise)
(wrap-nexus handler
{:keys [nexus/system->state] :as nexus}
system
&
[{:ring-nexus-middleware.core/keys [state-k]
:or {state-k :ring-nexus/state}}])
Given a nexus config map and a live system, wrap nexus action dispatch to provide FCIS (Functional Core Imperative Shell) support.
Parameters:
handler - The handler on which to wrap
nexus - The nexus config map. See https://github.com/cjohansen/nexus for more info on what the nexus map requires
system - The live system that will be passed to nexus. Can be an atom, a DB
connection, a map containing multiple atoms, datomic connections or any link
to a live system. N.B. nexus requires a :nexus/system->state functon that
transforms the system into a immutable state snapshot. wrap-nexus
will use
nexus/system->state
to add a snapshot of the state to the ring request
optional config - Last parameter is an optional config map ::state-k - the key on which to put the state snapshot
Given a nexus config map and a live system, wrap nexus action dispatch to provide FCIS (Functional Core Imperative Shell) support. Parameters: handler - The handler on which to wrap nexus - The nexus config map. See https://github.com/cjohansen/nexus for more info on what the nexus map requires system - The live system that will be passed to nexus. Can be an atom, a DB connection, a map containing multiple atoms, datomic connections or any link to a live system. N.B. nexus requires a :nexus/system->state functon that transforms the system into a immutable state snapshot. `wrap-nexus` will use `nexus/system->state` to add a snapshot of the state to the ring request optional config - Last parameter is an optional config map ::state-k - the key on which to put the state snapshot
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close