Liking cljdoc? Tell your friends :D

mount.lite

The core namespace providing the public API

The core namespace providing the public API
raw docstring

bindingsclj

(bindings & var-binding-seq)
(bindings opts & var-binding-seq)

Creates or updates start option map, supplying binding vectors for the given defstate vars. Make sure the symbols in the binding vectors are quoted. Multiple uses of this function on the same option map are merged.

Creates or updates start option map, supplying binding vectors for
the given defstate vars. Make sure the symbols in the binding
vectors are quoted. Multiple uses of this function on the same
option map are merged.
raw docstring

defstatecljmacro

(defstate name doc-string? attr-map? bindings? & {:as state-map})

Define a state. At least a :start expression should be supplied. Optionally one can define a :stop expression.

Define a state. At least a :start expression should be supplied.
Optionally one can define a :stop expression.
raw docstring

dotclj

(dot & {:as options})

Retuns a Graphviz dot representation of the state dependencies. Currently no options available.

Retuns a Graphviz dot representation of the state dependencies.
Currently no options available.
raw docstring

exceptclj

(except & vars)
(except opts & vars)

Creates or updates start/stop option map, starting or stopping all defstate vars, except the given vars. Multiple uses of this function on the same option map are united.

Creates or updates start/stop option map, starting or stopping all defstate
vars, except the given vars. Multiple uses of this function on the same option map
are united.
raw docstring

log-fnclj

(log-fn)
(log-fn val)

Get or set a log function, which is called whenever the status changes of a var. The function receives a var and a keyword, where the latter is one of :starting, :started, :stopping or :stopped. Default is nil, meaning no log function will be called.

Get or set a log function, which is called whenever the status changes of a var.
The function receives a var and a keyword, where the latter is one
of :starting, :started, :stopping or :stopped. Default is nil, meaning no log
function will be called.
raw docstring

on-reloadclj

(on-reload)
(on-reload val)

Get or set the on-reload override configuration. Default is nil, meaning the defstates themselves determine how they should respond to a redefinition. Default for defstates is :cascade, meaning all states up-to the reloaded state (inclusive) are stopped (except those with :on-cascade set to :skip).

Get or set the on-reload override configuration. Default is nil,
meaning the defstates themselves determine how they should respond
to a redefinition. Default for defstates is :cascade, meaning all
states `up-to` the reloaded state (inclusive) are stopped (except
those with :on-cascade set to :skip).
raw docstring

onlyclj

(only & vars)
(only opts & vars)

Creates or updates start/stop option map, only starting or stopping the given vars. Multiple uses of this function on the same option map are united.

Creates or updates start/stop option map, only starting or stopping the given
vars. Multiple uses of this function on the same option map are united.
raw docstring

parallelclj

(parallel threads)
(parallel opts threads)

Creates or updates start/stop option map, starting or stopping independent vars in parallel using the given number of threads. Multiple uses of this function on the same option map are overriding each other.

Creates or updates start/stop option map, starting or stopping
independent vars in parallel using the given number of threads.
Multiple uses of this function on the same option map are overriding
each other.
raw docstring

startclj

(start & optss)

Start all unstarted states (by default). One or more option maps can be supplied. The maps can contain the following keys, applied in the following order, and merged as specified:

:only - Collection of state vars that should be started, when not stopped. Multiples of these collections are united.

:except - Collection of state vars that should not be started. Multiples of these are united.

:up-to - A defstate var until which the states are started. In case multiple option maps are supplied, only the last :up-to option is used.

:parallel - The number of threads to use for parallel starting of the states. Default is nil, meaning the current thread will be used. In case multiple option maps are supplied, only the last :parallel option is used.

:substitute - A map of defstate vars to state-maps (see state macro) whose info is used instead of the defstate vars' state. Multiples of these maps are merged.

:bindings - A map of defstate vars to binding maps. Multiples of these maps are merged.

These option maps are easily created using the only, except, up-to and substitute functions.

Start all unstarted states (by default). One or more option maps
can be supplied. The maps can contain the following keys, applied in
the following order, and merged as specified:

:only - Collection of state vars that should be started, when not stopped.
        Multiples of these collections are united.

:except - Collection of state vars that should not be started. Multiples
          of these are united.

:up-to - A defstate var until which the states are started. In case multiple
         option maps are supplied, only the last :up-to option is used.

:parallel - The number of threads to use for parallel starting of the
            states. Default is nil, meaning the current thread will be
            used. In case multiple option maps are supplied, only the
            last :parallel option is used.

:substitute - A map of defstate vars to state-maps (see state macro) whose
              info is used instead of the defstate vars' state. Multiples
              of these maps are merged.

:bindings - A map of defstate vars to binding maps. Multiples of
            these maps are merged.

These option maps are easily created using the only, except, up-to and
substitute functions.
raw docstring

statecljmacro

(state & {:keys [start stop on-reload on-cascade]})

Make a state definition, useful for making test or mock states. Use with substitute function or :substitute key in start info. This is a convenience macro; a plain state-map can be used in the :substitute start option as well.

Note that the following does not define a state var, and won't be recognized by start or stop: (def foo (state ...)).

Make a state definition, useful for making test or mock states. Use with
substitute function or :substitute key in start info. This is a convenience
macro; a plain state-map can be used in the :substitute start option as well.

Note that the following does not define a state var, and won't be recognized by
start or stop: (def foo (state ...)).
raw docstring

statusclj

(status)
(status & vars)

Retrieve status map for all states, or the given state vars.

Retrieve status map for all states, or the given state vars.
raw docstring

stopclj

(stop & optss)

Stop all started states (by default). One or more option maps can be supplied. These maps are merged. The maps can contain the following keys, applied in the following order:

:only - Collection of state vars that should be stopped, when not started. Multiples of these collections are united.

:except - Collection of state vars that should not be stopped. Multiples of these are united.

:up-to - A defstate var until which the states are stopped. In case multiple option maps are supplied, only the last :up-to option is used.

:parallel - The number of threads to use for parallel stopping of the states. Default is nil, meaning the current thread will be used. In case multiple option maps are supplied, only the last :parallel option is used.

These option maps are easily created using the only, except and parallel functions.

Stop all started states (by default). One or more option maps can be
supplied. These maps are merged. The maps can contain the following keys,
applied in the following order:

:only - Collection of state vars that should be stopped, when not started.
        Multiples of these collections are united.

:except - Collection of state vars that should not be stopped. Multiples
          of these are united.

:up-to - A defstate var until which the states are stopped. In case multiple
         option maps are supplied, only the last :up-to option is used.

:parallel - The number of threads to use for parallel stopping of the
            states. Default is nil, meaning the current thread will be
            used. In case multiple option maps are supplied, only the
            last :parallel option is used.

These option maps are easily created using the only, except and parallel
functions.
raw docstring

substituteclj

(substitute & var-state-seq)
(substitute opts & var-state-seq)

Creates or updates start option map, supplying substitute states for the given defstate vars. Multiple uses of this function on the same option map are merged.

Creates or updates start option map, supplying substitute states for the given
defstate vars. Multiple uses of this function on the same option map are merged.
raw docstring

up-toclj

(up-to var)
(up-to opts var)

Creates or updates start/stop option map, starting or stopping only those vars that depend on the given var and itself. Multiple uses of this function on the same option map are overriding each other.

Creates or updates start/stop option map, starting or stopping only
those vars that depend on the given var and itself. Multiple uses of
this function on the same option map are overriding each other.
raw docstring

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

× close