Liking cljdoc? Tell your friends :D

org.rssys.context.core


*component-disabled*clj

Special config value, which prevents a component to start.

Special config value, which prevents a component to start.
sourceraw docstring

*components-path-vec*clj

A path in the system context where reside components (stateful objects)

A path in the system context where reside components (stateful objects)
sourceraw docstring

*ignore-cyclic-deps?*clj

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.
sourceraw docstring

*print-exceptions?*clj

Print exception info to stdout during start/stop operations with components.

Print exception info to stdout during start/stop operations with components.
sourceraw docstring

*stopped-component-state*clj

Special value, which indicates that state is empty or stopped.

Special value, which indicates that state is empty or stopped.
sourceraw docstring

build-contextclj

(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.
sourceraw docstring

create!clj

(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.
sourceraw docstring

delete!clj

(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.
sourceraw docstring

disabled-idsclj

(disabled-ids *ctx)

Get list of ids for all disabled components. Returns:

  • vector of keywords.
Get list of ids for all disabled components.
Returns:
 * vector of keywords.
sourceraw docstring

disabled?clj

(disabled? *ctx id-kwd)

Check if the component is disabled.

Check if the component is disabled.
sourceraw docstring

EmptyStateclj

source

get-componentclj

(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`.
sourceraw docstring

get-component-valueclj

(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`
sourceraw docstring

isolated-start!clj

(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.
sourceraw docstring

isolated-stop!clj

(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.
sourceraw docstring

list-all-idsclj

(list-all-ids *ctx)

Get list of ids for all registered components. Returns:

  • vector of keywords.
Get list of ids for all registered components.
Returns:
 * vector of keywords.
sourceraw docstring

set-config!clj

(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.
sourceraw docstring

start!clj

(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.
sourceraw docstring

start-allclj

(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.
sourceraw docstring

start-someclj

(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.
sourceraw docstring

started-idsclj

(started-ids *ctx)

Get list of ids for all started components. Returns:

  • vector of keywords.
Get list of ids for all started components.
Returns:
 * vector of keywords.
sourceraw docstring

started?clj

(started? *ctx id-kwd)

Check if the component is started.

Check if the component is started.
sourceraw docstring

stop!clj

(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.
sourceraw docstring

stop-allclj

(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.
sourceraw docstring

stop-someclj

(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.
sourceraw docstring

stopped-idsclj

(stopped-ids *ctx)

Get list of ids for all stopped components. Returns:

  • vector of keywords.
Get list of ids for all stopped components.
Returns:
 * vector of keywords.
sourceraw docstring

stopped?clj

Check if the component is stopped.

Check if the component is stopped.
sourceraw docstring

update!clj

(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.
sourceraw docstring

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

× close