Liking cljdoc? Tell your friends :D

curator.leader


interrupt-leadershipclj

(interrupt-leadership leader-selector)

Attempt to cancel current leadership if we currently have leadership

Attempt to cancel current leadership if we currently have leadership
sourceraw docstring

leaderclj

(leader leader-selector)
source

leader-selectorclj

(leader-selector curator-framework
                 path
                 leaderfn
                 &
                 {:keys [participant-id losingfn]
                  :or {participant-id (str (UUID/randomUUID))
                       losingfn (constantly nil)}})

Creates a Leader Selector. path: The path in ZooKeeper for storing this leadership group leaderfn: Function that will be called when the current process becomes leader. This function should block and only return when the process wishes to release leadership to someone else. losingfn: Optional function that will be called when the connection state changes indicating we're going to lose leadership. participant-id: Uniquely identifies this participant. Defaults to UUID/randomUUID

Creates a Leader Selector.
path: The path in ZooKeeper for storing this leadership group
leaderfn: Function that will be called when the current process becomes
   leader. This function should block and only return when the
   process wishes to release leadership to someone else.
losingfn: Optional function that will be called when the connection state
   changes indicating we're going to lose leadership.
participant-id: Uniquely identifies this participant. Defaults to UUID/randomUUID
sourceraw docstring

leader?clj

(leader? leader-selector)
source

listenerclj

(listener became-leader-fn losing-leader-fn participant-id)
source

participantsclj

(participants leader-selector)
source

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

× close