The runtime can be considered the 'live configuration'. It is created from the configuration, and is passed on to the application modules. The runtime provides the information (often in the form of functions) needed by the modules to perform work. This allows us to change application behaviour depending on configuration, but also when testing.
Thie namespace also provides some utility functions for working with the context. This is more stable than reading properties from the runtime directly.
The runtime can be considered the 'live configuration'. It is created from the configuration, and is passed on to the application modules. The runtime provides the information (often in the form of functions) needed by the modules to perform work. This allows us to change application behaviour depending on configuration, but also when testing. Thie namespace also provides some utility functions for working with the context. This is more stable than reading properties from the runtime directly.
(config->runtime conf)
Creates the runtime from the normalized config map
Creates the runtime from the normalized config map
(post-events {:keys [events]} evt)
Posts one or more events using the event poster in the runtime
Posts one or more events using the event poster in the runtime
(report rt obj)
Reports obj
to the user with the reporter from the runtime.
Reports `obj` to the user with the reporter from the runtime.
(rt->config rt)
Returns a map that can be serialized to edn
. This is used
to pass application configuration to child processes or containers.
Returns a map that can be serialized to `edn`. This is used to pass application configuration to child processes or containers.
(start rt)
Starts the runtime by starting all parts as a component tree. Returns a
component system that can be passed to stop
.
Starts the runtime by starting all parts as a component tree. Returns a component system that can be passed to `stop`.
(stop rt)
Stops a previously started runtime
Stops a previously started runtime
(with-runtime conf mode r & body)
Convenience macro that wraps with-runtime-fn
by binding runtime to r
and
invoking the body.
Convenience macro that wraps `with-runtime-fn` by binding runtime to `r` and invoking the body.
(with-runtime-fn conf mode f)
Creates a runtime for the given mode (server, cli, script) from the specified
configuration and passes it to f
.
Creates a runtime for the given mode (server, cli, script) from the specified configuration and passes it to `f`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close