Liking cljdoc? Tell your friends :D

donut.system


*system*clj/s


alias-componentclj/s

(alias-component component-id)

creates a component that just provides an instance defined elsewhere in the system

creates a component that just provides an instance defined elsewhere in the system
raw docstring

assoc-manyclj/s

(assoc-many m assocs)
(assoc-many m prefix assocs)

(assoc-many {} {[:foo :bar] :bux}) => {:foo {:bar :bux}

(assoc-many {} {[:foo :bar] :bux}) => {:foo {:bar :bux}
raw docstring

cache-componentclj/s

(cache-component {:keys [:donut.system/start :donut.system/stop]
                  :as component-def}
                 &
                 [cache-key])

cache component instance so that it's preserved between start/stop. takes as its argument a component def which must at least have a ::start signal handler that's a function. Useful for e.g. not restarting a threadpool for every test.

::stop signal won't fire unless instance is removed from component-instance-cache

instances are cached by [group-name component-name cache-key]

cache component instance so that it's preserved between start/stop. takes as
its argument a component def which must at least have a `::start` signal handler
that's a function. Useful for e.g. not restarting a threadpool for every test.

::stop signal won't fire unless instance is removed from
`component-instance-cache`

instances are cached by [group-name component-name cache-key]
raw docstring

Componentclj/s


component-dependenciesclj/s

(component-dependencies system component-id)

Set of all references to other components

Set of all references to other components
raw docstring

component-docclj/s

(component-doc system component-id)

component-idclj/s

(component-id ref)

component-idsclj/s

(component-ids system & [facet-key])

component-instance-cacheclj/s


component?clj/s


ComponentGroupclj/s

Components are grouped. This theoretically helps if publishing a component library. It also helps when creating multiple instances of the same collection of components because components are allowed to have local refs. See TODO for more details.

Components are grouped. This theoretically helps if publishing a component
library. It also helps when creating multiple instances of the same collection
of components because components are allowed to have local refs. See TODO for
more details.
raw docstring

ComponentGroupNameclj/s


ComponentGroupsclj/s


ComponentIdclj/s


ComponentLikeclj/s

Component-like data shows up in ::defs, ::resolved-defs, and ::instances. None of these are the component per se, but they are the way the component manifests in that context.

Component-like data shows up in `::defs`, `::resolved-defs`, and `::instances`. None
of these are the component per se, but they are the way the component
manifests in that context.
raw docstring

ComponentNameclj/s


ComponentSelectionclj/s


configure-componentclj/s

(configure-component m configs)

Help in setting just the config of a component

Help in setting just the config of a component
raw docstring

DeepRefPathKeyclj/s


default-signalsclj/s

which graph sort order to follow to apply signal, and where to put result

which graph sort order to follow to apply signal, and where to put result
raw docstring

dependency-pairsclj/s

(dependency-pairs system)

Pairs of [A B], where A is component that depends on B

Pairs of [A B], where A is component that depends on B
raw docstring

describe-componentclj/s

(describe-component system component-id)

describe-componentsclj/s

(describe-components system)

describe-systemclj/s

(describe-system system)

DonutRefclj/s


DonutSystemclj/s


flat-assoc-inclj/s

(flat-assoc-in m p v)

flat-get-inclj/s

(flat-get-in m p)

Graphclj/s

Graphs are used to specify component dependency order and signal application order.

Graphs are used to specify component dependency order and signal application
order.
raw docstring

group-ref-exceptionclj/s

(group-ref-exception _system
                     referencing-component-id
                     referenced-component-group-name)

group-ref?clj/s

(group-ref? ref)

init-systemclj/s

(init-system maybe-system signal-name)

instanceclj/s

(instance system)
(instance system [component-group component-name :as component-id])

Get a specific component instance. With no arguments returns set of all component names.

Get a specific component instance. With no arguments returns set of all
component names.
raw docstring

local-refclj/s

(local-ref k)

LocalRefclj/s


LocalRefKeyclj/s


MinComponentclj/s

Check that at least one of the signals is present

Check that at least one of the signals is present
raw docstring

named-systemclj/smultimethod

A way to name different system, e.g. :test, :dev, :prod, etc.

A way to name different system, e.g. :test, :dev, :prod, etc.
raw docstring

OrderGraphsclj/s

Topsorted and reverse-topsorted graphs are generated once when a system is initialized and assoc'c into the system. These graphs are used when applying signals.

Topsorted and reverse-topsorted graphs are generated once when a system is
initialized and assoc'c into the system. These graphs are used when applying
signals.
raw docstring

Pluginclj/s


PluginSystemclj/s


Refclj/s


refclj/s

(ref k)

ref-exceptionclj/s

(ref-exception _system referencing-component-id referenced-component-id)

ref-keyclj/s


ref-typeclj/s


ref?clj/s


RefKeyclj/s


Registryclj/s


registry-instanceclj/s

(registry-instance system registry-key)

Returns a component instance for a given key, rather than a given path. Relies on ::registry mapping registry keys to component paths.

For cases where libraries want to use component instances without having to rely on hard-coded paths.

Returns a component instance for a given key, rather than a given path. Relies
on ::registry mapping registry keys to component paths.

For cases where libraries want to use component instances without having to
rely on hard-coded paths.
raw docstring

registry-refclj/s

(registry-ref k)

registry-ref->refclj/s

(registry-ref->ref system registry-key)

RegistryKeyclj/s


RegistryRefclj/s


RegistryRefKeyclj/s


required-componentclj/s

A placeholder component used to communicate that a component needs to be provided.

A placeholder component used to communicate that a component needs to be
provided.
raw docstring

reset-component-instance-cache!clj/s

(reset-component-instance-cache!)

resolvedclj/s

(resolved {:keys [:donut.system/component-id :donut.system/resolved-defs]})

resumeclj/s

(resume system)

select-componentsclj/s

(select-components system component-keys)

You can scope down what component keys to use. In subsequent interactions with a system, use only those component keys.

You can scope down what component keys to use. In subsequent interactions with
a system, use only those component keys.
raw docstring

signalclj/s

(signal system signal-name)

SignalConfigclj/s

The set of signals your system can respond to is configurable. To apply a signal, the system needs to know in what order components should be traversed.

The set of signals your system can respond to is configurable. To apply a
signal, the system needs to know in what order components should be
traversed.
raw docstring

startclj/s

(start config-name)
(start config-name component-def-overrides)
(start config-name component-def-overrides component-ids)

stopclj/s

(stop system)

stop-failed-systemclj/s

(stop-failed-system)
(stop-failed-system e)

Will attempt to stop a system that threw an exception when starting

Will attempt to stop a system that threw an exception when starting
raw docstring

strkclj/s

(strk & xs)

Like str but with keywords

Like `str` but with keywords
raw docstring

subsystem-componentclj/s

(subsystem-component subsystem & [imports])

Decorates a subsystem so that it can respond to signals when embedded in a parent component.

Decorates a subsystem so that it can respond to signals when embedded in a
parent component.
raw docstring

suspendclj/s

(suspend system)

systemclj/s

(system sconf)
(system sconf component-def-overrides)
(system sconf component-def-overrides selected-components)

specify a system or a system named registered with config, and optionally provide overrides

specify a system or a system named registered with `config`, and optionally
provide overrides
raw docstring

system-fixtureclj/s

(system-fixture system)

To be used with use-fixtures

To be used with `use-fixtures`
raw docstring

system?clj/s


update-manyclj/s

(update-many m update-many-with-map)

Map of many paths to update, and their update fns

Map of many paths to update, and their update fns
raw docstring

with-*system*clj/smacro

(with-*system* system & body)

Start a system and bind it to system. Stop system after body.

Start a system and bind it to *system*. Stop system after body.
raw docstring

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

× close