Liking cljdoc? Tell your friends :D

exoscale.checkmate

3 main states

  • success (all good)
  • error (bad, potentially retry)
  • failure (terminal failure)
  • Conditions control if we should retry and how to setup the ctx at first call, and how to update the ctx upon failures (inc retry counter for instance). Conditions are in effect, composable and should remain pure (ctx in/out).

You can for instance do:

;; will retry up to 3 times with a 1000ms delay between tries (cm/do! #(do-something) [(delayed-retries (constant-backoff-delays 1000)) (max-retries 3)])

  • Effects can apply side effects at various stages (ex sleep, update state machine), they are purely for io, as opposed to Conditions
3 main states

* success (all good)
* error (bad, potentially retry)
* failure (terminal failure)

- Conditions control if we should retry and how to setup the ctx
at first call, and how to update the ctx upon failures (inc retry
counter for instance). Conditions are in effect, composable and
should remain pure (ctx in/out).

You can for instance do:

;; will retry up to 3 times with a 1000ms delay between tries
(cm/do! #(do-something) [(delayed-retries (constant-backoff-delays 1000)) (max-retries 3)])

- Effects can apply side effects at various stages (ex sleep, update
state machine), they are purely for io, as opposed to Conditions
raw docstring

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

× close