pip_services3_components.config.IConfigReader module
pip_services3_components.config.IConfigReader
interface for configuration readers
- copyright
Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details.
- license
MIT, see LICENSE for more details.
-
class
pip_services3_components.config.IConfigReader.
IConfigReader
Bases:
abc.ABC
Interface for configuration readers that retrieve configuration from various sources and make it available for other components.
Some IConfigReader implementations may support configuration parameterization. The parameterization allows to use configuration as a template and inject there dynamic values. The values may come from application command like arguments or environment variables.
-
add_change_listener
(listener: pip_services3_commons.run.INotifiable.INotifiable) Adds a listener that will be notified when configuration is changed
- Parameters
listener – a listener to be added.
-
read_config_
(correlation_id: Optional[str], parameters: pip_services3_commons.config.ConfigParams.ConfigParams) → pip_services3_commons.config.ConfigParams.ConfigParams Reads configuration and parameterize it with given values.
- Parameters
correlation_id – (optional) transaction id to trace execution through call chain.
parameters – values to parameters the configuration or null to skip parameterization.
- Returns
ConfigParams configuration.
-
remove_change_listener
(listener: pip_services3_commons.run.INotifiable.INotifiable) Remove a previously added change listener.
- Parameters
listener – a listener to be removed.
-