A simple bulletin board for managing channels in an event bus system. This is extracted from closed source code I've been using for a while. It's not feature complete, because I did not need all the features. But as an open-source library I will make time to add all the HOFs in core.async.
I use this setup within integrant keys allowing for a visual way to see how channels are connected. Because of the way core.async manages it's mults, taps, pubs and subs, closing almost all the channels occurs by closing the event bus. I've never bothered to add a close function to this library because the wiring is meant to be immutable. All channels are added and wired at integrant init and not intended to be changed after that. Although if your needs differ. As a plus, mixing this with integrant.repl.state and portal makes it dead simple to reason about what is happening in your system.
A simple bulletin board for managing channels in an event bus system. This is extracted from closed source code I've been using for a while. It's not feature complete, because I did not need all the features. But as an open-source library I will make time to add all the HOFs in core.async. I use this setup within integrant keys allowing for a visual way to see how channels are connected. Because of the way core.async manages it's mults, taps, pubs and subs, closing almost all the channels occurs by closing the event bus. I've never bothered to add a close function to this library because the wiring is meant to be immutable. All channels are added and wired at integrant init and not intended to be changed after that. Although if your needs differ. As a plus, mixing this with integrant.repl.state and portal makes it dead simple to reason about what is happening in your system.
(add-chan! m)
(add-chan! bulbo ch-id)
(add-chan! bulbo ch-id ch)
Generic add channel function. If a channel is provided, it will be used. Otherwise, a new channel will be created.
Generic add channel function. If a channel is provided, it will be used. Otherwise, a new channel will be created.
(add-merge! m)
(add-merge! bulbo merge-ident ch-idents)
Adds a merge of the supplied channels.
Adds a merge of the supplied channels.
(add-mixer! m)
(add-mixer! bulbo mixer-ident)
Adds a mixer and output channel, attaching channels if provided.
Adds a mixer and output channel, attaching channels if provided.
(add-mult! m)
(add-mult! bulbo mult-id src-id)
Creates a new mult, links it to it's source and adds it to the bulletin board.
Creates a new mult, links it to it's source and adds it to the bulletin board.
(add-pub! m)
(add-pub! bulbo pub-ident src-ident rule)
Adds a pub, linking it to a source, and adds it to the bulletin board.
Adds a pub, linking it to a source, and adds it to the bulletin board.
(add-sub! m)
(add-sub! bulbo sub-ident pub-ident topic)
Adds a sub to a pub. Must provide an existing channel.
Adds a sub to a pub. Must provide an existing channel.
(add-tap! m)
(add-tap! bulbo tap-ident mult-ident)
(add-tap! bulbo tap-ident tap-ch mult-ident)
Creates a tap, taps it into a mult and adds it to the bulletin board.
Creates a tap, taps it into a mult and adds it to the bulletin board.
(add-to-mix! m)
(add-to-mix! bulbo chan-ident mixer-ident)
(add-to-mix! bulbo chan-ident mixer-ident toggle-config)
Adds a channel to a mix, setting it's config if provided.
Adds a channel to a mix, setting it's config if provided.
(bulbo! & ms)
Wires a channel into the bulletin board.
Wires a channel into the bulletin board.
(extract-chan-ns id)
Takes the channel ns from a channel's coordinates. In the event of nested coordinates, takes the last ns.
Takes the channel ns from a channel's coordinates. In the event of nested coordinates, takes the last ns.
(flattenv thing)
Flattens a collection and returns a vector
Flattens a collection and returns a vector
(id->f id)
Takes an id and returns the function that creates, wires, and adds it to the bulletin board.
Takes an id and returns the function that creates, wires, and adds it to the bulletin board.
(mute-chan! m)
(mute-chan! bulbo mixer-ident chan-ident)
Mutes a channel in a mix.
Mutes a channel in a mix.
(pause-chan! m)
(pause-chan! bulbo mixer-ident chan-ident)
Pauses a channel in a mix.
Pauses a channel in a mix.
(solo-chan! m)
(solo-chan! bulbo mixer-ident chan-ident)
Solos a channel in a mix.
Solos a channel in a mix.
(toggle-chan! m)
(toggle-chan! bulbo mixer-ident chan-ident toggle-config)
Changes the mix settings on a channel.
Changes the mix settings on a channel.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close