Liking cljdoc? Tell your friends :D

matthiasn.systems-toolbox.switchboard


attach-to-firehoseclj/s

(attach-to-firehose {:keys [current-state msg-payload cmp-id]})

Attaches a component to firehose channel. For example for observational components.

Attaches a component to firehose channel. For example for observational
components.
sourceraw docstring

componentclj/s

(component switchboard-id)
(component switchboard-id cmp-opts)

Creates a switchboard component that wires individual components together into a communicating system.

Creates a switchboard component that wires individual components together
into a communicating system.
sourceraw docstring

handler-mapclj/s

source

mk-stateclj/s

(mk-state _put-fn)
source

self-registerclj/s

(self-register {:keys [cmp-state msg-payload cmp-id]})

Registers switchboard itself as another component that can be wired. Useful for communication with the outside world / within hierarchies where a subsystem has its own switchboard.

Registers switchboard itself as another component that can be wired. Useful
for communication with the outside world / within hierarchies where a
subsystem has its own switchboard.
sourceraw docstring

send-cmdclj/s

(send-cmd switchboard cmd)

Send message to the specified switchboard component.

Send message to the specified switchboard component.
sourceraw docstring

send-mult-cmdclj/s

(send-mult-cmd switchboard cmds)

Send messages to the specified switchboard component.

Send messages to the specified switchboard component.
sourceraw docstring

send-toclj/s

(send-to {:keys [cmp-state msg-payload]})

Send message to specified component.

Send message to specified component.
sourceraw docstring

wire-all-out-channelsclj/s

(wire-all-out-channels {:keys [cmp-state]})

Function for calling the system-ready-fn on each component, which will pipe the channel used by the put-fn to the out-chan when the system is connected. Otherwise, messages sent before all channels are wired would get lost.

Function for calling the system-ready-fn on each component, which will pipe
the channel used by the put-fn to the out-chan when the system is connected.
Otherwise, messages sent before all channels are wired would get lost.
sourceraw docstring

xform-fnclj/s

(xform-fn m)

Transformer function for switchboard state snapshot. Allows serialization of snapshot for sending, e.g. over WebSockets or other transports.

Transformer function for switchboard state snapshot. Allows serialization of
snapshot for sending, e.g. over WebSockets or other transports.
sourceraw docstring

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

× close