Liking cljdoc? Tell your friends :D

moira.application

Configure module dependencies, manage module lifecycles, and set up the unified application log for inter-module communication.

Configure module dependencies, manage module lifecycles, and set up
the unified application log for inter-module communication.
raw docstring

*timeout*cljs

source

*warnings?*cljs

source

Chainablecljsprotocol

then!cljs

(then! this f)

Schedule state update f for after the current chain of commands has finished.

Updates internal state from return value. Return value can be a promise resolving to the new state.

Schedule state update `f` for after the current chain of commands has
finished.

Updates internal state from return value. Return value can be a promise
resolving to the new state.
source

createcljs

(create system-map)

Create an Application instance from module definitions in system-map.

Each entry in system-map defines a single module by mapping keywords to the respective module-maps incorporating all configuration and state.

Create an Application instance from module definitions in `system-map`.

Each entry in `system-map` defines a single module by mapping keywords to
the respective module-maps incorporating all configuration and state.
sourceraw docstring

Extendablecljsprotocol

extend!cljs

(extend! this modules)

Extend system-map to include modules defined in modules.

New properties are added and existing properties are not changed.

Extend `system-map` to include modules defined in `modules`.

New properties are added and existing properties are not changed.

override!cljs

(override! this modules)

Override system-map to update modules defined in modules.

New properties are added and existing properties are changed.

Override `system-map` to update modules defined in `modules`.

New properties are added and existing properties are changed.
source

init!cljs

(init! app config)
(init! app config ks)

Load config into app. Returns a promise resolving to the new system map after start.

Load `config` into `app`. Returns a promise resolving to
the new system map after start.
sourceraw docstring

load!cljs

(load! app modules)

Load modules defined in modules into app. Returns a promise resolving to the new system map after start.

Updates app and starts all provided modules immediately. Existing modules are extended and only started when not already up.

Load modules defined in `modules` into `app`. Returns a promise resolving to
the new system map after start.

Updates `app` and starts all provided modules immediately. Existing modules
are extended and only started when not already up.
sourceraw docstring

pause!cljs

(pause! app)
(pause! app ks)

Halt application by applying :pause.

This is an alternate version of stop presumably called during development, e.g. before hot reloading code.

Halt application by applying `:pause`.

This is an alternate version of `stop` presumably called during development,
e.g. before hot reloading code.
sourceraw docstring

resume!cljs

(resume! app)
(resume! app ks)

Reactivate application by applying :resume.

This is an alternate version of start presumably called during development, e.g. after hot reloading code.

Reactivate application by applying `:resume`.

This is an alternate version of `start` presumably called during development,
e.g. after hot reloading code.
sourceraw docstring

start!cljs

(start! app)
(start! app ks)

Start modules defined in ks and all their dependencies. Start all modules defined by app, when no ks are given. Returns a promise resolving to the new system map with updated module states.

Dependencies are guaranteed to be started first. :app-log is injected, if not already present, and automatically added to each module's :deps.

Starting a module is idempotent (i.e., :start is only called, when the module is not already tagged as :started). Module :state is updated by calling :start on the current value and a map of dependency keys to values returned by applying respective :export on dependency :state. For additional context, the module key and the app instance are also passed to the update function.

When a circular dependency is detected, an error is thrown and starting is aborted before any calls to :start.

Start modules defined in `ks` and all their dependencies. Start all modules
defined by `app`, when no `ks` are given. Returns a promise resolving to the
new system map with updated module states.

Dependencies are guaranteed to be started first. `:app-log` is injected, if
not already present, and automatically added to each module's `:deps`.

Starting a module is idempotent (i.e., `:start` is only called, when the
module is not already tagged as `:started`). Module `:state` is updated by
calling `:start` on the current value and a map of dependency keys to values
returned by applying respective `:export` on dependency `:state`.
For additional context, the module key and the `app` instance are also passed
to the update function.

When a circular dependency is detected, an error is thrown and starting is
aborted before any calls to `:start`.
sourceraw docstring

stop!cljs

(stop! app)
(stop! app ks)

Stop modules defined in ks and all their dependents. Stop all modules defined by app when no ks are given. Returns a promise resolving to the new system map with updated module states.

Dependent modules are guaranteed to be stopped first. :stop is only called, when the module is tagged as :started. Nothing is called when a circular dependency is detected.

Module :state is updated by calling :stop on the current value. :stop defaults to setting the state to nil.

Stop modules defined in `ks` and all their dependents. Stop all modules
defined by `app` when no `ks` are given. Returns a promise resolving to the
new system map with updated module states.

Dependent modules are guaranteed to be stopped first. `:stop` is only called,
when the module is tagged as `:started`. Nothing is called when a circular
dependency is detected.

Module `:state` is updated by calling `:stop` on the current value. `:stop`
defaults to setting the state to `nil`.
sourceraw docstring

Thenablecljsprotocol

thencljs

(then this f)

Return promise resolving to application state after current chain of commands has finished.

Return promise resolving to application state after current chain of
commands has finished.
source

Transitionablecljsprotocol

down!cljs

(down! this txs ks)

Tear down modules ks and their dependencies in reversed order by applying interceptors txs.

Tear down modules `ks` and their dependencies in reversed order by
applying interceptors `txs`.

tx!cljs

(tx! this txs ks)

Apply interceptors txs to modules ks.

Apply interceptors `txs` to modules `ks`.

up!cljs

(up! this txs ks)

Elevate modules ks and their dependencies by applying interceptors txs.

Elevate modules `ks` and their dependencies by applying interceptors
`txs`.
source

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

× close