Configuration_retrievers
This module contains functionality related to the the configuration_retrievers
module for core
.
Configuration_retrievers
BaseConfigurationRetriever
Bases: ABC
Abstract base class for configuration retrieval.
This class defines the common interface and functionality for retrieving application configurations from various sources. Concrete implementations should extend this class to provide specific retrieval mechanisms.
Attributes: |
|
---|
Source code in src/core/configuration_retrievers.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
__init__(configuration_class, metadata, logger=LoggerConfiguration.get_logger(__name__))
Initialize the configuration retriever.
Parameters: |
|
---|
Source code in src/core/configuration_retrievers.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
get(verbose=True)
abstractmethod
Retrieve the configuration.
Parameters: |
|
---|
Returns: |
|
---|
Source code in src/core/configuration_retrievers.py
40 41 42 43 44 45 46 47 48 49 50 |
|
ConfiguratioRetriverRegistry
Registry for configuration retrievers.
Provides factory methods to get the appropriate configuration retriever based on context.
Source code in src/core/configuration_retrievers.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
get(on_prem)
Get the appropriate configuration retriever class.
Parameters: |
|
---|
Returns: |
|
---|
Source code in src/core/configuration_retrievers.py
159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
OnPremConfigurationRetriever
Bases: BaseConfigurationRetriever
Configuration retriever for on-premise file sources.
Retrieves configurations from local JSON files.
Source code in src/core/configuration_retrievers.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
|
get(verbose=True)
Retrieve configuration from local files.
This method implements caching to avoid re-reading configuration files.
Parameters: |
|
---|
Returns: |
|
---|
Source code in src/core/configuration_retrievers.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
|
RemoteConfigurationRetriever
Bases: BaseConfigurationRetriever
Configuration retriever for remote sources.
Retrieves configuration from remote sources like config servers or cloud storage. Currently not implemented.
Source code in src/core/configuration_retrievers.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
get(verbose=True)
Retrieve configuration from a remote source.
Parameters: |
|
---|
Raises: |
|
---|
Returns: |
|
---|
Source code in src/core/configuration_retrievers.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|