eventstreamr2.configuration.loader¶
- eventstreamr2.configuration.loader.load_config_file(conf_mgr, file, source, priority=<object object at 0x7fb00e62b970>)[source]¶
Load a single configuration from a file and store it in the given conference manager.
If priority is not given then it is loaded from the file(or defaults to None if it is missing). Otherwise it passes the value through to set_config().
Parameters: - conf_mgr (eventstreamr2.configuration.ConfigurationManager) – Configuration manager.
- file (str) – The file name.
- source (int or None) – The name of the configuration source to pass through to the manager.
- source – The priority of the configuration source to pass through to the manager.
- eventstreamr2.configuration.loader.load_backup_config_file(conf_mgr, file)[source]¶
Load a single configuration from a file and store it in the given conference manager.
If priority is not given then it is loaded from the file(or defaults to None if it is missing). Otherwise it passes the value through to set_config().
It expects a file of the format:
{ "source": { "_priority": 10 "service": { ... }, "service2": { ... } } "source2": { "_priority": 10 ... } }Parameters: - conf_mgr (eventstreamr2.configuration.ConfigurationManager) – Configuration manager.
- file (str) – The file name.
- source (int or None) – The name of the configuration source to pass through to the manager.
- source – The priority of the configuration source to pass through to the manager.