module Athena::Config
Overview
Athena's Config component contains common types for configuring a component.
Currently the two primary types are ACF::Base, and ACF::ConfigurationResolver. ACF::Base represents the structure of Athena's YAML configuration file.
ACF::ConfigurationResolver allows resolving the configuration for a given component within a service. See each specific type for more detailed information.
Defined in:
athena-config.crConstant Summary
-
CONFIG_PATH_NAME =
"ATHENA_CONFIG_PATH" -
The name of the environment variable that stores the path to the configuration file.
-
DEFAULT_CONFIG_PATH =
"./athena.yml" -
The default path to the configuration file.
-
VERSION =
"0.1.0"
Class Method Summary
-
.config : ACF::Base
Returns the
ACF::Baseobject instantiated from the configuration file located at.config_path. -
.config_path : String
Returns the current path that the configuration file is located at.
Class Method Detail
Returns the ACF::Base object instantiated from the configuration file located at .config_path.
The contents of the configuration file are included into the binary at compile time so that the file itself
does not need to be present for the binary to run. The configuration string is not processed until .config is called for the first time
so that in the future it will respect ENV vars for the environment the binary is in.
TODO Handle resolving ENV vars and DI parameters within the configuration file.
Returns the current path that the configuration file is located at.
Falls back on DEFAULT_CONFIG_PATH if a ATHENA_CONFIG_PATH ENV variable is not defined.