Liking cljdoc? Tell your friends :D

ring-nexus.core


has-fail-fast-strategy?clj

(has-fail-fast-strategy? nexus)
source

maybe-add-fail-fastclj

(maybe-add-fail-fast nexus)
source

prepare-nexusclj

(prepare-nexus nexus
               respond
               {:ring-nexus/keys [fail-fast?] :or {fail-fast? true}})
source

wrap-nexusclj

(wrap-nexus handler
            {:keys [nexus/system->state] :as nexus}
            system
            &
            [{:ring-nexus/keys [state-k on-error]
              :or {state-k :nexus/state
                   on-error (fn* [p1__1744#] (throw p1__1744#))}
              :as opts}])

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

opts - Last parameter is an optional config map:

  • :ring-nexus/state-k - the key on which to put the state snapshot

  • :ring-nexus/fail-fast? - If nexus should fail fast if one of the dispatch actions failed. Default is true.

  • :ring-nexus/on-error - callback used with error from actions/effects. Defaults to throw

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

opts  - Last parameter is an optional config map:

- :ring-nexus/state-k - the key on which to put the state snapshot

- :ring-nexus/fail-fast? - If nexus should fail fast if one of the dispatch actions
failed. Default is true.
- :ring-nexus/on-error - callback used with error from actions/effects. Defaults to throw
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close