Created
December 29, 2013 05:15
-
-
Save bbbates/8167675 to your computer and use it in GitHub Desktop.
Confijulate example configuration namespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns | |
| ^:cfj-config | |
| example.config | |
| (:require [confijulate.core :as cfj])) | |
| (def ^:cfj-base base-config | |
| {:db | |
| {:classname "net.sf.log4jdbc.DriverSpy" | |
| :subprotocol "log4jdbc" | |
| :subname "postgresql:example" | |
| :user "example" | |
| :password "example" | |
| :delimiters ""} | |
| :jobs | |
| {:enable-schedule false ;;disabled by default | |
| :process-registration {:cron "00 * * * * ?"} | |
| :alerts-immediate {:cron "00 * * * * ?"} | |
| :alerts-frequent {:cron "00 00 * * * ?"} | |
| :alerts-infrequent {:cron "00 00 10 * * ?"}}}) | |
| (def ^{:cfj-env "test"} test-config | |
| { | |
| :db | |
| {:subname "postgresql://some-server.example.com/example" | |
| :password "password"} | |
| :jobs | |
| { | |
| :enable-schedule true}}) | |
| (def ^{:cfj-env "prod"} test-config | |
| { | |
| :db | |
| {:subname "postgresql://some-prod-server.example.com/example" | |
| :password "strong-password"} | |
| :jobs | |
| { | |
| :enable-schedule true | |
| :alerts-frequent {:cron "00 0/5 * * ?"}}}) | |
| (def get-cfg cfj/get-cfg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment