You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
;; the builder namespace supports passing builder confgurations as functions
(require '[unleash-client-clojure.builder :as b])
(defunleash (u/build
(b/app-name"app-name")
(b/unleash-api"https://unleash.herokuapp.com/api/")
(b/environment"staging")
(b/fetch-toggles-interval1)))
;; see the builder namespace for more available options
Subscriber support
;; one a subscriber can be pased to the client builder by passing
(b/subscriber my-subscriber)
;; the subscriber namespace has functions to help you build a subsriber
(require '[unleash-client-clojure.subscriber :as s])
;; pass a map with the keys [:on-error :on-event :toggle-evaluated;; :toggles-fetched :client-metrics :client-registered :toggles-backed-up;; :toggle-backup-restored] and callbacks you want to register.;; any missing key defaults to no-op;; this is a very noisy example:
(defunleash
(u/build
(b/app-name"app-name")
(b/unleash-api"https://unleash.herokuapp.com/api/")
(b/subscriber
(s/build {:on-event println})))