pub(crate) fn load(path: &Path) -> Result<Config, Box<dyn Error>>Expand description
Loads configuration from a TOML file, then applies environment variable overrides.
§Environment variable overrides
The following environment variables, when set, override the corresponding TOML fields:
STARGAZER_POSTGRES_URLoverridespostgres.urlSTARGAZER_RDIO_ENDPOINToverridesrdio.endpointSTARGAZER_RDIO_API_KEYoverridesrdio.api_keySTARGAZER_TIER3_DPLUS_CALLSIGNoverridestier3.dplus_callsignSTARGAZER_SERVER_LISTENoverridesserver.listen
§Errors
Returns an error if the file cannot be read or contains invalid TOML, or
if the STARGAZER_SERVER_LISTEN environment variable contains an invalid
socket address.