Liking cljdoc? Tell your friends :D

state-flow.core


add-desc-and-metacljmacro

(add-desc-and-meta [fname & rest] desc meta)

as-step-fnclj

(as-step-fn flow)

Transform a flow step into a state transition function

Transform a flow step into a state transition function
raw docstring

description->stringclj

(description->string description)

flowcljmacro

(flow description & flows)

Defines a flow

Defines a flow
raw docstring

get-descriptionclj

(get-description)

pop-metaclj


probe-statecljmacro

(probe-state desc state right-value metadata)

Given a fact description, a state and a right-value, returns a State that runs left up to times-to-retry times every sleep-time ms until left-value equals right value.

Given a fact description, a state and a right-value,
returns a State that runs left up to times-to-retry times every sleep-time ms until left-value equals right value.
raw docstring

push-metaclj

(push-meta description)

retryclj

(retry times pred? lazy-seq)

Tries at most n times, returns a vector with true and first element that succeeded or false and result of the first try

Tries at most n times, returns a vector with true and first element that succeeded
or false and result of the first try
raw docstring

runclj

(run flow initial-state)

run!clj

(run! flow initial-state)

Like run, but prints a log and throws error when flow fails with an exception

Like run, but prints a log and throws error when flow fails with an exception
raw docstring

run*clj

(run* {:keys [init cleanup runner]
       :or {init (constantly {}) cleanup identity runner run!}}
      flow)

Run a flow with specified parameters

Receives optional parameter maps init, a function with no arguments that returns the initial state. cleanup, function receiving the final state to perform cleanup if necessary runner, function that will receive a flow and an initial state and execute the flow

Run a flow with specified parameters

Receives optional parameter maps
`init`, a function with no arguments that returns the initial state.
`cleanup`, function receiving the final state to perform cleanup if necessary
`runner`, function that will receive a flow and an initial state and execute the flow
raw docstring

sleep-timeclj


times-to-tryclj


update-descriptionclj

(update-description old new)

verifycljmacro

(verify desc left-value right-value)

If left-value is a state, do fact probing. Otherwise, regular fact checking. Push and pop descriptions (same behaviour of flow)

If left-value is a state, do fact probing. Otherwise, regular fact checking.
Push and pop descriptions (same behaviour of flow)
raw docstring

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

× close