Liking cljdoc? Tell your friends :D

mount.lite

The core namespace providing the public API

The core namespace providing the public API
raw docstring

*states*clj

Atom keeping track of defined states (by namespaced keywords) internally. Declared public and dynamic here, as an extension point to influence which states are started or stopped. Do not fiddle with the root binding.

Atom keeping track of defined states (by namespaced
keywords) internally. Declared public and dynamic here, as an
extension point to influence which states are started or stopped.
Do not fiddle with the root binding.
sourceraw docstring

*substitutes*clj

Can be bound to a map with vars as keys and State records as values. The :start and :stop expressions of the State value will be used when the corresponding var key is started. The with-substitutes macro offers a nicer syntax.

Can be bound to a map with vars as keys and State records as
values. The :start and :stop expressions of the State value will
be used when the corresponding var key is started. The
`with-substitutes` macro offers a nicer syntax.
sourceraw docstring

defstatecljmacro

(defstate name & args)

Define a state. At least a :start expression should be supplied. Optionally one can define a :stop expression. Supports docstring and attribute map.

Define a state. At least a :start expression should be supplied.
Optionally one can define a :stop expression. Supports docstring and
attribute map.
sourceraw docstring

startclj

(start)
(start up-to-var)

Start all the loaded defstates, or only the defstates up to the given state var. Only stopped defstates are started. They are started in the context of the current session.

Start all the loaded defstates, or only the defstates up to the
given state var. Only stopped defstates are started. They are
started in the context of the current session.
sourceraw docstring

statecljmacro

(state & {:keys [start stop name] :or {name "-anonymous-"} :as fields})

Create an anonymous state, useful for substituting. Supports three keyword arguments. A required :start expression, an optional :stop expression, and an optional :name for the state.

Create an anonymous state, useful for substituting. Supports three
keyword arguments. A required :start expression, an optional :stop
expression, and an optional :name for the state.
sourceraw docstring

statusclj

(status)

Retrieve status map for all states.

Retrieve status map for all states.
sourceraw docstring

stopclj

(stop)
(stop down-to-var)

Stop all the loaded defstates, or only the defstates down to the given state var. Only started defstates are stopped. They are stopped in the context of the current session.

Stop all the loaded defstates, or only the defstates down to the
given state var. Only started defstates are stopped. They are
stopped in the context of the current session.
sourceraw docstring

with-sessioncljmacro

(with-session & body)

Creates a new thread, with a new system of states. All states are initially in the stopped status in this thread, regardless of the status in the thread that spawns this new session. This spawned thread and its subthreads will automatically use the states that are started within this thread or subthreads. Exiting the spawned thread will automatically stop all states in this session.

Returns a map with the spawned :thread and a :promise that will be set to the result of the body or an exception.

Creates a new thread, with a new system of states. All states are
initially in the stopped status in this thread, regardless of the
status in the thread that spawns this new session. This spawned
thread and its subthreads will automatically use the states that are
started within this thread or subthreads. Exiting the spawned thread
will automatically stop all states in this session.

Returns a map with the spawned :thread and a :promise that will be
set to the result of the body or an exception.
sourceraw docstring

with-substitutescljmacro

(with-substitutes var-sub-pairs & body)

Given a vector with var-state pairs, an inner start function will use the :start expression of the substitutes for the specified vars. Nested with-substitutes are merged.

Given a vector with var-state pairs, an inner start function will
use the :start expression of the substitutes for the specified
vars. Nested `with-substitutes` are merged.
sourceraw docstring

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

× close