Liking cljdoc? Tell your friends :D

redelay.core

Core API for creating and managing first class state objects.

Core API for creating and managing first class state objects.
raw docstring

close!clj

(close! state)

Close the State, skipping the stop logic.

Close the State, skipping the stop logic.
sourceraw docstring

defstatecljmacro

(defstate name doc-string? attr-map? body)

Create a State object, using the optional :start, :stop and :meta expressions, and bind it to a var with the given name in the current namespace. Trying to redefine an active (i.e. realized) defstate is skipped.

Create a State object, using the optional :start, :stop and :meta
expressions, and bind it to a var with the given name in the current
namespace. Trying to redefine an active (i.e. realized) defstate
is skipped.
sourceraw docstring

statecljmacro

(state & exprs)

Create a state object, using the optional :start, :stop, :name and :meta expressions. The first forms are implicitly considered as the :start expression, if not qualified otherwise.

Returned State object implements IDeref (deref), IPending (realized?), Closeable (.close), IPersistentStack (peek), Named (name, namespace), IMeta (meta) and IReference (alter-meta!, reset-meta!).

Create a state object, using the optional :start, :stop, :name
and :meta expressions. The first forms are implicitly considered as
the :start expression, if not qualified otherwise.

Returned State object implements IDeref (`deref`),
IPending (`realized?`), Closeable (`.close`),
IPersistentStack (`peek`), Named (`name`, `namespace`),
IMeta (`meta`) and IReference (`alter-meta!`, `reset-meta!`).
sourceraw docstring

state*clj

(state* {:keys [name start-fn stop-fn meta]
         :or {name (gensym "state--") start-fn (fn []) stop-fn (fn [_])}})

Low-level function to create a State object. All keys are optional. The :start-fn value must be a 0-arity function. The :stop-fn value must be a 1-arity function. The :meta value must be a map.

Low-level function to create a State object. All keys are optional.
The `:start-fn` value must be a 0-arity function. The `:stop-fn`
value must be a 1-arity function. The `:meta` value must be a map.
sourceraw docstring

state?clj

(state? obj)

Returns true if obj is a State object.

Returns true if obj is a State object.
sourceraw docstring

statusclj

(status)

Returns a list of active states, in realization order.

Returns a list of active states, in realization order.
sourceraw docstring

stopclj

(stop)

Stop the active states in the reverse order they were realized.

Stop the active states in the reverse order they were realized.
sourceraw docstring

watchpointclj

Add watches to this var to be notified of state changes, using add-watch. The third argument to the watch fn will be one of :starting, :started, :stopping or :stopped. The fourth argument is the State object.

Add watches to this var to be notified of state changes, using
`add-watch`. The third argument to the watch fn will be one of
`:starting`, `:started`, `:stopping` or `:stopped`. The fourth
 argument is the State object.
sourceraw docstring

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

× close