Liking cljdoc? Tell your friends :D

state-flow.core


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
sourceraw docstring

current-descriptionclj

(current-description)

Returns a flow that returns the description as of the point of execution.

For internal use. Subject to change.

Returns a flow that returns the description as of the point of execution.

For internal use. Subject to change.
sourceraw docstring

flowcljmacro

(flow description & flows)

Defines a flow

Defines a flow
sourceraw docstring

flow*clj

(flow* {:keys [description caller-meta]} & flows)
source

ignore-errorclj

(ignore-error pair)

No-op error handler that simply ignores the error.

No-op error handler that simply ignores the error.
sourceraw docstring

log-and-throw-error!clj

(log-and-throw-error! pair)

Error handler that logs the error and throws an exception to notify the flow has failed.

Error handler that logs the error and throws an exception to notify the flow
has failed.
sourceraw docstring

modify-metaclj

(modify-meta f & args)

Returns a monad that will apply vary-meta to the world.

For internal use. Subject to change.

Returns a monad that will apply vary-meta to the world.

For internal use. Subject to change.
sourceraw docstring

pop-metaclj

(pop-meta)
source

push-metaclj

(push-meta description {:keys [line]})

Returns a flow that will modify the state metadata.

For internal use. Subject to change.

Returns a flow that will modify the state metadata.

For internal use. Subject to change.
sourceraw docstring

runclj

(run flow)
(run flow initial-state)

Given an initial-state (default {}), runs a flow and returns a tuple of the result of the last step in the flow and the end state.

Given an initial-state (default {}), runs a flow and returns a tuple of
the result of the last step in the flow and the end state.
sourceraw docstring

run!cljdeprecated

(run! flow)
(run! flow initial-state)

DEPRECATED. Use run*

DEPRECATED. Use `run*`
sourceraw docstring

run*clj

(run* {:keys [init cleanup runner on-error]
       :or {init (constantly {})
            cleanup identity
            runner run
            on-error log-and-throw-error!}
       :as opts}
      flow)

Runs a flow with specified parameters. Use run unless you need the customizations run* supports.

Supported keys in the first argument are:

init optional, default (constantly {}), function of no arguments that returns the initial state cleanup optional, default identity, function of the final state used to perform cleanup, if necessary runner optional, default run, function of a flow and an initial state which will execute the flow on-error optional, default log-and-throw-error!, function of the final result pair to be invoked when the first value in the pair represents an error

Runs a flow with specified parameters. Use `run` unless you need
the customizations `run*` supports.

Supported keys in the first argument are:

  `init`     optional, default (constantly {}), function of no arguments that returns the initial state
  `cleanup`  optional, default identity, function of the final state used to perform cleanup, if necessary
  `runner`   optional, default `run`, function of a flow and an initial state which will execute the flow
  `on-error` optional, default `log-and-throw-error!`, function of the final result pair to be invoked
             when the first value in the pair represents an error
sourceraw docstring

top-level-descriptionclj

(top-level-description s)

Returns the description passed to the top level flow (or the stringified symbol passed to defflow).

Returns the description passed to the top level flow (or the
stringified symbol passed to defflow).
sourceraw docstring

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

× close