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
raw docstring

leaderclj

(leader leader-selector)

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
raw docstring

leader?clj

(leader? leader-selector)

listenerclj

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

participantsclj

(participants leader-selector)

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

× close