lib-onyx.log-subscriber

->LogSubscriber

(->LogSubscriber peer-config inbox-capacity callback-fn)
Positional factory function for class lib_onyx.log_subscriber.LogSubscriber.

log-subscriber-component

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

map->LogSubscriber

(map->LogSubscriber m__6522__auto__)
Factory function for class lib_onyx.log_subscriber.LogSubscriber, taking a map of keywords to field values.

start-log-subscriber

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

stop-log-subscriber

(stop-log-subscriber log-subscriber)
Shuts down the log subscriber Component.