Expand description
Module that initializes the logger and loads the configuration into a dedicated Struct.
FunctionsΒ§
- Retrieves the environment variables and parses as the data-type specified in Config struct.
- get_
time πGet the current time in a specific format. - Initializes the logger based on the provided debug flag and cargo information.
- load_
env_ πvars Handler thatβs responsible to parse all the env vars. - mandatory_
vars πExtracts the mandatory env vars by key and parses it asHashMap<String, String>andPathBuf - parse_
bool πExtracts the env var by key and parses it as abool - parse_
i64 πExtracts the env var by key and parses it as ai64 - parse_
max_ πpayload Parses the maximum payload size from human-readable memory format to bytes. - parse_
memory π - parse_
path πExtracts the env var by key and parses it as aPathBuf - parse_
u16 πExtracts the env var by key and parses it as au16 - parse_
usize πExtracts the env var by key and parses it as ausize - parse_
vec πExtracts the env var by key and parses it as aVec<String> - Validates the directory structure to ensure that the secure index is present in media sourceβs root.
- validate_
vars πValidates all the required environment variables with the required settings.