Liking cljdoc? Tell your friends :D

tools.drilling.bob

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.
raw docstring

add-chan!clj/s

(add-chan! m)
(add-chan! bob ch-id)
(add-chan! bob 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.
raw docstring

add-merge!clj/s

(add-merge! m)
(add-merge! bob merge-ident ch-idents)

Adds a merge of the supplied channels.

Adds a merge of the supplied channels.
raw docstring

add-mixer!clj/s

(add-mixer! m)
(add-mixer! bob mixer-ident)

Adds a mixer and output channel, attaching channels if provided.

Adds a mixer and output channel, attaching channels if provided.
raw docstring

add-mult!clj/s

(add-mult! m)
(add-mult! bob 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.
raw docstring

add-pub!clj/s

(add-pub! m)
(add-pub! bob 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.
raw docstring

add-sub!clj/s

(add-sub! m)
(add-sub! bob 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.
raw docstring

add-tap!clj/s

(add-tap! m)
(add-tap! bob tap-ident mult-ident)
(add-tap! bob 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.
raw docstring

add-to-bob!clj/s

(add-to-bob! bob comms)

Wires everything into bulletin board. Comms arg is a vector. The order of this vector should be starting with your event-bus. :buses, taps, mults, pubs, subs, merges, consumers. Often nothing bad will happen if you don't do this, but it's good practice because when you don't you may wind up creating a new channel when you'd prefer to use an old one and there's no easy way to troubleshoot that one.

Wires everything into bulletin board. Comms arg is a vector. The order of this vector should be starting with your event-bus. :buses, taps, mults, pubs, subs, merges, consumers. Often nothing bad will happen if you don't do this, but it's good practice because when you don't you may wind up creating a new channel when you'd prefer to use an old one and there's no easy way to troubleshoot that one.
raw docstring

add-to-mix!clj/s

(add-to-mix! m)
(add-to-mix! bob chan-ident mixer-ident)
(add-to-mix! bob 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.
raw docstring

bob!clj/s

(bob! & ms)

Wires a channel into the bulletin board.

Wires a channel into the bulletin board.
raw docstring

dir-addclj/s

(dir-add m)
(dir-add bob id v)
(dir-add bob ln id v)

dir-path-forclj/s

(dir-path-for id)
(dir-path-for ln id)

extract-chan-nsclj/s

(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.
raw docstring

flattenvclj/s

(flattenv thing)

Flattens a collection and returns a vector

Flattens a collection and returns a vector
raw docstring

id->fclj/s

(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.
raw docstring

mute-chan!clj/s

(mute-chan! m)
(mute-chan! bob mixer-ident chan-ident)

Mutes a channel in a mix.

Mutes a channel in a mix.
raw docstring

namespace-to-subdir-registryclj/s


ns->creation-f-registryclj/s


pause-chan!clj/s

(pause-chan! m)
(pause-chan! bob mixer-ident chan-ident)

Pauses a channel in a mix.

Pauses a channel in a mix.
raw docstring

solo-chan!clj/s

(solo-chan! m)
(solo-chan! bob mixer-ident chan-ident)

Solos a channel in a mix.

Solos a channel in a mix.
raw docstring

subdir-forclj/s

(subdir-for id)

toggle-chan!clj/s

(toggle-chan! m)
(toggle-chan! bob mixer-ident chan-ident toggle-config)

Changes the mix settings on a channel.

Changes the mix settings on a channel.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close