Special config value, which prevents a component to start.
Special config value, which prevents a component to start.
A path in the system context where reside components (stateful objects)
A path in the system context where reside components (stateful objects)
If false then throw Exception if cyclic dependency is detected. If true, ignore cyclic dependency loop and force to start.
If false then throw Exception if cyclic dependency is detected. If true, ignore cyclic dependency loop and force to start.
Print exception info to stdout during start/stop operations with components.
Print exception info to stdout during start/stop operations with components.
Special value, which indicates that state is empty or stopped.
Special value, which indicates that state is empty or stopped.
(build-context *new-ctx component-list)
Build a system context using given component-list
.
Params:
*new-ctx
- atom with map (empty or not), where to put result.component-list
- vector of ::component
Returns:*new-ctx
- modified atom as system context if success.exception
- if component-list is invalid or other errors.Build a system context using given `component-list`. Params: * `*new-ctx` - atom with map (empty or not), where to put result. * `component-list` - vector of ::component Returns: * `*new-ctx` - modified atom as system context if success. * `exception` - if component-list is invalid or other errors.
(create! *ctx new-component)
Create new component in the system context. Returns:
r/success-types
- if success.r/error-types
- if failure.Create new component in the system context. Returns: * `r/success-types` - if success. * `r/error-types` - if failure.
(delete! *ctx id-kwd)
Delete a component from the system context. Returns:
r/success-types
- if success.r/error-types
- if failure.Delete a component from the system context. Returns: * `r/success-types` - if success. * `r/error-types` - if failure.
(disabled-ids *ctx)
Get list of ids for all disabled components. Returns:
Get list of ids for all disabled components. Returns: * vector of keywords.
(disabled? *ctx id-kwd)
Check if the component is disabled.
Check if the component is disabled.
(get-component *ctx id-kwd)
Returns: component state
from system context using its id-kwd
.
Returns: `component state` from system context using its `id-kwd`.
(get-component-value ctx id-kwd)
Returns: component value
from system context value using its id-kwd
Returns: `component value` from system context value using its `id-kwd`
(isolated-start! *ctx id-kwd)
(isolated-start! *ctx id-kwd start-fn stop-fn)
Isolated start a component ignoring all its dependencies, using given id-kwd
and (optionally) the start/stop functions.
Preserving :stops-deps value from previous isolated stop or start.
Returns:
r/success-types
- if success.r/error-types
- if failure.Isolated start a component ignoring all its dependencies, using given `id-kwd` and (optionally) the start/stop functions. Preserving :stops-deps value from previous isolated stop or start. Returns: * `r/success-types` - if success. * `r/error-types` - if failure.
(isolated-stop! *ctx id-kwd)
Isolated stop the component ignoring all its dependencies using given id-kwd
.
Preserving :stops-deps value from previous start.
Returns:
r/success-types
- if success.r/error-types
- if failure.Isolated stop the component ignoring all its dependencies using given `id-kwd`. Preserving :stops-deps value from previous start. Returns: * `r/success-types` - if success. * `r/error-types` - if failure.
(list-all-ids *ctx)
Get list of ids for all registered components. Returns:
Get list of ids for all registered components. Returns: * vector of keywords.
(set-config! *ctx id-kwd new-config)
Set new config for a component. Returns:
r/success-types
- if success.r/error-types
- if failure.Set new config for a component. Returns: * `r/success-types` - if success. * `r/error-types` - if failure.
(start! *ctx id-kwd)
(start! *ctx id-kwd dep-path-list)
(start! *ctx id-kwd start-fn stop-fn)
(start! *ctx id-kwd start-fn stop-fn dep-path-list)
Start a component and all its dependencies using given id-kwd
and (optionally) the start/stop functions.
Returns:
r/success-types
- if success.r/error-types
- if failure.Start a component and all its dependencies using given `id-kwd` and (optionally) the start/stop functions. Returns: * `r/success-types` - if success. * `r/error-types` - if failure.
(start-all *ctx)
Start all registered components, which are not started yet. Returns:
r/success-types
- if success.r/error-types
- if failure.Start all registered components, which are not started yet. Returns: * `r/success-types` - if success. * `r/error-types` - if failure.
(start-some *ctx component-list)
Start some of the registered components, which are not started yet. Params:
component-list
- vector of keywords with component's id.
Returns:r/success-types
- if success.r/error-types
- if failure.Start some of the registered components, which are not started yet. Params: * `component-list` - vector of keywords with component's id. Returns: * `r/success-types` - if success. * `r/error-types` - if failure.
(started-ids *ctx)
Get list of ids for all started components. Returns:
Get list of ids for all started components. Returns: * vector of keywords.
(started? *ctx id-kwd)
Check if the component is started.
Check if the component is started.
(stop! *ctx id-kwd)
Stop the component and all its dependencies using given id-kwd
.
Returns:
r/success-types
- if success.r/error-types
- if failure.Stop the component and all its dependencies using given `id-kwd`. Returns: * `r/success-types` - if success. * `r/error-types` - if failure.
(stop-all *ctx)
Stop all registered components, which are not stopped yet. Returns:
r/success-types
- if success.r/error-types
- if failure.Stop all registered components, which are not stopped yet. Returns: * `r/success-types` - if success. * `r/error-types` - if failure.
(stop-some *ctx component-list)
Stop some of the registered components, which are not stopped yet. Params:
component-list
- vector of keywords with component's id.
Returns:r/success-types
- if success.r/error-types
- if failure.Stop some of the registered components, which are not stopped yet. Params: * `component-list` - vector of keywords with component's id. Returns: * `r/success-types` - if success. * `r/error-types` - if failure.
(stopped-ids *ctx)
Get list of ids for all stopped components. Returns:
Get list of ids for all stopped components. Returns: * vector of keywords.
Check if the component is stopped.
Check if the component is stopped.
(update! *ctx new-component-state)
Update a component's state in the system context. Returns:
r/success-types
- if success.r/error-types
- if failure.Update a component's state in the system context. Returns: * `r/success-types` - if success. * `r/error-types` - if failure.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close