Defines system component with lifecycle (start, stop etc.) functions.
Defines system component with lifecycle (start, stop etc.) functions.
System component lifecycle functions.
System component lifecycle functions.
(start-fn component)Returns function to start component instance. The returned function receives a map of other component instances which this component depends on, and returns started instance.
(fn start [system] instance)
Returns function to start component instance. The returned function
receives a map of other component instances which this component depends on,
and returns started instance.
(fn start [system] instance)
(stop-fn component)Returns function to stop component instance, or nil if component does not
need to be stopped:
(fn stop! [instance] (.stop instance))
Returns function to stop component instance, or `nil` if component does not
need to be stopped:
(fn stop! [instance] (.stop instance))
(suspend-fn component)Returns function to suspend component instance, or nil if component is
not suspendable:
(fn suspend! [instance old-system]
;; Return function to resume component instance with new system.
(fn resume [new-system]
;; Return resumed or restarted instance using old and new systems.
resumed-instance))
Returns function to suspend component instance, or `nil` if component is
not suspendable:
(fn suspend! [instance old-system]
;; Return function to resume component instance with new system.
(fn resume [new-system]
;; Return resumed or restarted instance using old and new systems.
resumed-instance))
(of start stop!)(of start stop! suspend!)Returns component as persistent map assembled from provided functions.
Returns component as persistent map assembled from provided functions.
(start component system)Returns component instance started in the system context. The system is a
map of other component instances which this component depends on.
Returns component instance started in the system context. The `system` is a map of other component instances which this component depends on.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |