amelinium.system
added in 1.0.0
amelinium system.
conf-dirs->resource-names
(conf-dirs->resource-names d)
(conf-dirs->resource-names d & more)
load-with-namespaces
(load-with-namespaces config)
Returns the given config, loading any detected namespaces with integrant.core/load-namespaces
.
read-configs
(read-configs resource-config-dir-or-map)
(read-configs local-file resource-config-dir & more-dirs)
Reads configuration files in EDN format. For 2 or more arguments it loads local-file
from a filesystem (unless it’s nil
) and scans all resource directories specified as other arguments. For each directory it tries to find filenames ending with .edn
and loads them all in order. The local file is being loaded last.
The function returns a single configuration map merged from all loaded maps. The configuration sources are preserved in this map under a key :amelinium.app/config-sources
, containing the following keys: :resource-dirs
, :resource-files
and :local-file
.
When there is only 1 argument given and it is a map then it should be a valid config with :amelinium.app/config-sources
key present. The associated map will be then used as a sources list of loaded configuration.
When there is only 1 argument given and it is not a map then it should be a sequential collection of resource directories to scan and load configuration from. In this case the local configuration file is considered to be nil
.
subsystems
(subsystems config)
(subsystems config keys)
Selects subsystems from the given configuration map config
by selecting 1st-level branch keys. Returns a map.