Liking cljdoc? Tell your friends :D


Build Status Clojars Project cljdoc badge

A configuration library for Clojure building on Archaius.


[com.github.csm/scarif "0.1.8"]

API Documentation

(ns my-ns
  (:require [clojure.spec.alpha :as s]
            [scarif.core :as sc]

; Install dynamodb configuration source.

; Use my-config-var as a regular var.
; The value will come from the DynamicStringProperty my-ns/my-config-var, parsed
; as EDN.
(sc/defconfig my-config-var :foo)

; for dynamic config sources, you can install a callback that is invoked if the
; value changes
(sc/defconfig ^{:on-change (fn [old new] ,,,)} my-config-2)

; If a spec is defined for your var, values coming from Archaius will be validated
; against it before the var is changed.
(s/def :my-ns/my-config-3 keyword?)
(sc/defconfig my-config-3)

; You can access the property itself via the :property metadata
(-> #'my-ns/my-config-3 meta :property (.getValue))


Copyright © 2018, 2019 Casey Marshall

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Can you improve this documentation?Edit on GitHub

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

× close