pub enum ConfigError {
Io(Error),
Yaml(Error),
InvalidMode {
raw: String,
},
InvalidPort {
raw: String,
},
InvalidStorageBackend {
raw: String,
},
InvalidColdAction {
raw: String,
},
InvalidUnsignedInt {
var: &'static str,
raw: String,
},
ArchiveUrlRequired,
WarmDaysNotGreaterThanHotDays {
hot: u32,
warm: u32,
},
}Expand description
Errors that can occur while loading or parsing a GatewayConfig.
All variants carry enough context to be surfaced verbatim to an
operator running aasm start; Display implementations come
from thiserror so they format cleanly into log lines and CLI
stderr.
Variants§
Io(Error)
Failed to read the YAML config file (permission denied, or other filesystem error other than “file not found”).
Yaml(Error)
The YAML payload could not be deserialised into a GatewayConfig.
InvalidMode
AA_MODE was set to something other than local or remote.
InvalidPort
AAASM_GATEWAY_PORT was not a valid u16.
InvalidStorageBackend
AAASM_STORAGE_BACKEND was set to something other than sqlite
or postgres.
InvalidColdAction
AAASM_RETENTION_COLD_ACTION was set to something other than
drop or archive.
InvalidUnsignedInt
A retention env var (AAASM_RETENTION_HOT_DAYS,
AAASM_RETENTION_WARM_DAYS, …) was not a non-negative integer.
Fields
ArchiveUrlRequired
storage.retention.cold_action = archive was selected but no
archive_url was supplied (in YAML or via env var).
WarmDaysNotGreaterThanHotDays
storage.retention.warm_days was less than or equal to
hot_days — the warm tier must extend past the hot tier.
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()