Fetch configuration from the environment.
Presently, config is stored statefully in an atom after initial load.
Fetch configuration from the environment. Presently, config is stored statefully in an `atom` after initial load.
(default-config)This is our default, precendence based, load config from environment mechasnism. A deep merge is used to create final config map.
Current precendence is:
Typical usage involves the fetching the base config from s3 with overrides provided by environment variables. Full configuration via environment variables is not supported; only environment variables for which a matching top-level map is found will be merged.
This is our default, precendence based, load config from environment mechasnism. A deep merge is used to create final config map. Current precendence is: 1) Environemt variables 2) AWS S3 Typical usage involves the fetching the base config from s3 with overrides provided by environment variables. Full configuration via environment variables is not supported; only environment variables for which a matching top-level map is found will be merged.
(fetch-s3)This does some nasty things to avoid a hard dependency on aws.s3 in this project.
Ultimately we shouldn't need this, the config stage of application/development startup needs to revisited. But until all of our components' constructors are refactored this isn't possible.
When that day comes we can remove the use of eval, the atom, and move to
a stateless startup sequence, where each component recieves the entire config map and
parses out the piece it's interested in.
This does some nasty things to avoid a hard dependency on `aws.s3` in this project. Ultimately we shouldn't need this, the config stage of application/development startup needs to revisited. But until all of our components' constructors are refactored this isn't possible. When that day comes we can remove the use of `eval`, the atom, and move to a stateless startup sequence, where each component recieves the entire config map and parses out the piece it's interested in.
(set! m)Set the config-map atom to configuration sourced from the envinronment,
probably from:
org.purefn.kurosawa.config.file/fetchorg.purefn.kurosawa.config.env/fetch, ororg.purefn.kurosawa.aws.ssm/fetchSet the `config-map` atom to configuration sourced from the envinronment, probably from: - `org.purefn.kurosawa.config.file/fetch` - `org.purefn.kurosawa.config.env/fetch`, or - `org.purefn.kurosawa.aws.ssm/fetch`
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |