Provides publish-subscribe handling of events. Publishers push events onto a channel, which has n subscribers. Each subscriber subscribes to a channel with an optional predicate function. Events which match the predicate are sent to the subscriber.
Provides publish-subscribe handling of events. Publishers push events onto a channel, which has n subscribers. Each subscriber subscribes to a channel with an optional predicate function. Events which match the predicate are sent to the subscriber.
(dissoc-in m [k & ks :as keys])
Dissociates an entry from a nested associative structure returning a new nested structure. keys is a sequence of keys. Any empty maps that result will not be present in the new structure.
Dissociates an entry from a nested associative structure returning a new nested structure. keys is a sequence of keys. Any empty maps that result will not be present in the new structure.
The most recently assigned subscription ID.
The most recently assigned subscription ID.
The PubSub protocol defines the interface for publishing and subscribing to channels; essentially, sets of named callbacks.
The PubSub protocol defines the interface for publishing and subscribing to channels; essentially, sets of named callbacks.
(publish! this channel event)
Publish an event to a channel.
Publish an event to a channel.
(subscribe! this channel f)
(subscribe! this channel f persistent?)
Subscribes to the given channel. Returns a Subscription.
Subscribes to the given channel. Returns a Subscription.
(sweep! this)
Shuts down all non-persistent subscriptions. Used when reloading the pubsub system, and we want to clear any subscriptions from the old streams.
Shuts down all non-persistent subscriptions. Used when reloading the pubsub system, and we want to clear any subscriptions from the old streams.
(unsubscribe! this sub)
Cancels a subscription.
Cancels a subscription.
(pubsub-registry)
Returns a new pubsub registry, which tracks which subscribers are listening to which channels.
Returns a new pubsub registry, which tracks which subscribers are listening to which channels.
(sub-id)
Returns a new unique subscription ID.
Returns a new unique subscription ID.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close