Liking cljdoc? Tell your friends :D

state-flow.core


apply-before-flow-hookclj

(apply-before-flow-hook)
source

as-step-fncljdeprecated

(as-step-fn flow)

DEPRECATED with no replacement.

DEPRECATED with no replacement.
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

default-stack-trace-exclusionsclj

source

description->fileclj

(description->file {:keys [file]})
source

description-stackclj

(description-stack s)

For internal use. Subject to change

For internal use. Subject to change
sourceraw docstring

fail-fast?clj

Should the flow stop after the first failing assertion?

For internal use. Subject to change.

Should the flow stop after the first failing assertion?

For internal use. Subject to change.
sourceraw docstring

filter-stack-traceclj

(filter-stack-trace)
(filter-stack-trace exclusions)

Returns an error handler which, if the first element in the pair is a failure, returns the pair with the failure's stack-trace filtered, else returns the pair as/is.

exclusions (default default-stack-trace-exclusions) is a sequence of regular expressions used to match class names in stack trace frames. Matching frames are excluded.

Returns an error handler which, if the first element in the pair is
a failure, returns the pair with the failure's stack-trace
filtered, else returns the pair as/is.

exclusions (default default-stack-trace-exclusions) is a sequence of
regular expressions used to match class names in stack trace frames.
Matching frames are excluded.
sourceraw docstring

flowcljmacro

(flow description & flows)

Creates a flow which is a composite of flows.

Creates a flow which is a composite of flows.
sourceraw docstring

flow*clj

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

For use in macros that create flows. Not private (appropriate for helper libraries, for example), but not intended for use directly in flows.

Creates a flow which is a composite of flows. The calling macro should provide (meta &form) as :caller-meta in order to support accurate line number reporting.

For use in macros that create flows. Not private (appropriate for
helper libraries, for example), but not intended for use directly in
flows.

Creates a flow which is a composite of flows. The calling macro should
provide (meta &form) as `:caller-meta` in order to support accurate line
number reporting.
sourceraw docstring

format-descriptionclj

(format-description stack)
source

ignore-errorclj

(ignore-error pair)

No-op error handler that ignores the error.

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

log-and-throw-error!cljdeprecated

(log-and-throw-error! pair)

DEPRECATED: Use (comp throw-error! log-error) instead.

DEPRECATED: Use (comp throw-error! log-error) instead. 
sourceraw docstring

log-errorclj

(log-error pair)

Error handler that logs error and returns pair.

Error handler that logs error and returns pair.
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)

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

push-metaclj

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

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 fail-fast? before-flow-hook]
       :or {init (constantly {})
            cleanup identity
            runner run
            fail-fast? false
            before-flow-hook identity
            on-error (comp throw-error!
                           log-error
                           (filter-stack-trace
                             default-stack-trace-exclusions))}}
      flow)

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

Supported keys in the first argument are:

:fail-fast? optional, default false, when set to true, the flow stops running after the first failing assertion :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 :before-flow-hook optional, default identity, function from state to new-state that is applied before excuting a flow, after flow description is updated. :on-error optional, function of the final result pair to be invoked when the first value in the pair represents an error, default: (comp throw-error! log-error (filter-stack-trace default-strack-trace-exclusions))

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

Supported keys in the first argument are:

  `:fail-fast?`       optional, default `false`, when set to `true`, the flow stops running after the first failing assertion
  `: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
  `:before-flow-hook` optional, default `identity`, function from state to new-state that is applied before excuting a flow, after flow description is updated.
  `:on-error`         optional, function of the final result pair to be invoked when the first value in the pair represents an error, default:
                      `(comp throw-error!
                            log-error
                            (filter-stack-trace default-strack-trace-exclusions))`
sourceraw docstring

runnerclj

(runner)

Creates a flow that returns the runner (function). Useful for helpers that need to access the runner.

Creates a flow that returns the runner (function). Useful for
helpers that need to access the runner.
sourceraw docstring

throw-error!clj

(throw-error! pair)

Error handler that throws the error.

Error handler that throws the 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