Liking cljdoc? Tell your friends :D

lib-onyx.log-subscriber


log-subscriber-componentclj

(log-subscriber-component peer-config inbox-capacity)
(log-subscriber-component peer-config inbox-capacity callback-fn)
source

start-log-subscriberclj

(start-log-subscriber peer-config)
(start-log-subscriber peer-config args)

Takes a peer config map, and an args map. Args accepts keys :inbox-capacity, representing the buffer size of the core.async channel reading from ZooKeeper, and optionally :callback-fn which is called each time a log entry is read and applied to the replica. This function is supplied with the subscriber component and next replica state map.

This function returns a Component with key :state. :state is an atom of a map of keys :replica, :as-of-entry, and :as-of-timestamp. :replica is the current replica. :as-of-entry is the sequential ID in ZooKeeper for the last entry read by this subscriber, and :as-of-timestamp is the timestamp of the entry, as known by ZooKeeper.

Takes a peer config map, and an args map. Args accepts keys
:inbox-capacity, representing the buffer size of the core.async
channel reading from ZooKeeper, and optionally :callback-fn which is called
each time a log entry is read and applied to the replica. This function is supplied
with the subscriber component and next replica state map.

This function returns a Component with key :state. :state is an atom of a map
of keys :replica, :as-of-entry, and :as-of-timestamp. :replica is the current
replica.  :as-of-entry is the sequential ID in ZooKeeper for the last entry
read by this subscriber, and :as-of-timestamp is the timestamp of the entry,
as known by ZooKeeper.
sourceraw docstring

stop-log-subscriberclj

(stop-log-subscriber log-subscriber)

Shuts down the log subscriber Component.

Shuts down the log subscriber Component.
sourceraw docstring

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

× close