Defines system component with lifecycle (start, stop etc.) functions.
Defines system component with lifecycle (start, stop etc.) functions.
(bundle start-fn stop!)
(bundle start-fn stop! suspend!)
Returns component as persistent map assembled from provided functions.
Returns component as persistent map assembled from provided functions.
System component lifecycle functions.
System component lifecycle 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.
(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))
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close