Liking cljdoc? Tell your friends :D

manifold.bus

An implementation of an event bus, where publishers and subscribers can interact via topics.

An implementation of an event bus, where publishers and subscribers can interact via topics.
raw docstring

active?clj

(active? bus topic)

Returns true if there are any subscribers to topic.

Returns `true` if there are any subscribers to `topic`.
sourceraw docstring

downstreamclj

(downstream bus topic)

Returns a list of all streams subscribed to topic.

Returns a list of all streams subscribed to `topic`.
sourceraw docstring

event-busclj

(event-bus)
(event-bus stream-generator)

Returns an event bus that can be used with publish! and subscribe.

Returns an event bus that can be used with `publish!` and `subscribe`.
sourceraw docstring

publish!clj

(publish! bus topic message)

Publishes a message on the bus, returning a deferred result representing the message being accepted by all subscribers. To prevent one slow consumer from blocking all the others, use manifold.stream/buffer, or manifold.stream/connect with a timeout specified.

Publishes a message on the bus, returning a deferred result representing the message
being accepted by all subscribers.  To prevent one slow consumer from blocking all
the others, use `manifold.stream/buffer`, or `manifold.stream/connect` with a timeout
specified.
sourceraw docstring

subscribeclj

(subscribe bus topic)

Returns a stream which consumes all messages from topic.

Returns a stream which consumes all messages from `topic`.
sourceraw docstring

topic->subscribersclj

(topic->subscribers bus)
source

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

× close