Liking cljdoc? Tell your friends :D

consul.watch


check-idclj

(check-id service-definition)
source

exp-waitclj

(exp-wait n max-ms)
source

leader-watchclj

(leader-watch conn
              {:keys [lock-delay node name checks behavior ttl] :as session}
              k
              leader-ch
              {:keys [max-retry-wait query-params log] :as options})

Setup a leader election watch on a given key, sends a vector with [path true/false] when the election changes.

If you close the leader-ch, it releases leader for the key

Setup a leader election watch on a given key, sends a vector with [path true/false] when the
election changes.

If you close the leader-ch, it releases leader for the key
sourceraw docstring

long-pollclj

(long-poll conn spec ch {:as options})

Polls consul using spec and publishes results onto ch. Applies no throttling of requests towards consul except via ch.

Polls consul using spec and publishes results onto ch.  Applies no throttling of requests towards consul except via ch.
sourceraw docstring

pollclj

(poll conn spec params)

Calls consul for the given spec passing params. Returns the exception if one occurs.

Calls consul for the given spec passing params.  Returns the exception if one occurs.
sourceraw docstring

poll!clj

(poll! conn [kw x] params)
source

register-serviceclj

(register-service conn service-definition update-ms)

Register a service and keeps sending a health check to Consul every update-ms

Register a service and keeps sending a health check to Consul every update-ms
sourceraw docstring

setup-leader-watchclj

(setup-leader-watch name)
source

setup-watchclj

(setup-watch conn
             [watch-key path :as spec]
             change-chan
             {:keys [max-retry-wait query-params log] :as options})

Creates a watching channel and notifies changes to a change-chan channel

:query-params - the query params passed into the underlying service call :max-retry-wait - max interval before retying consul when a failure occurs. Defaults to 5s.

The watch will terminate when the change-chan output channel is closed or when resulting function is called

Creates a watching channel and notifies changes to a change-chan channel

:query-params   - the query params passed into the underlying service call
:max-retry-wait - max interval before retying consul when a failure occurs.  Defaults to 5s.

The watch will terminate when the change-chan output channel is closed or when resulting
function is called
sourceraw docstring

ttl-check-updateclj

(ttl-check-update conn check-id ms ch)
source

update-stateclj

(update-state new-config)
(update-state old-state new-config)

When called with new-config, creates a new state map. When called with old-state and new-config, old-state is updated with new-config.

When called with new-config, creates a new state map.  When called with old-state and new-config, old-state is updated with new-config.
sourceraw docstring

watch-fnsclj

source

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

× close