Skip to main content

Module config

Module config 

Source
Expand description

signal.yaml loading.

The file is resolved from $SIGNAL_CONFIG first (a local path, or an https://, s3://, gs:// or az:// URL; see crate::source), then ./signal.yaml. If neither exists the SDK still works: it falls back to the zero-config default (console provider, SQLite sink at ./signals.db), so notify() never needs setup to do something useful.

${VAR} placeholders in string values are replaced from the environment so secrets like Slack webhook URLs stay out of the file. A placeholder whose variable is unset is a config error, not an empty string: a blank webhook URL would only fail later, at delivery time, which is exactly when nobody is looking.

Structs§

Config
ConsoleConfig
EmailConfig
Serialize as well, so a build without the AWS feature can hand the config to the opssignal[aws] add-on.
Layer
One file of a layered config: what it sets itself, plus the files it builds on. Config::from_layers merges a chain of these.
OpsgenieConfig
PagerDutyConfig
ProvidersConfig
Typed per provider, with unknown keys rejected, so a typo like slak: is a load-time error rather than a silently missing provider.
SesConfig
SlackConfig
SmtpConfig
StorageConfig
TeamsConfig
WebhookConfig

Enums§

EmailTransport
How an EmailConfig sends.
SinkKind
SmtpTls
How the SMTP connection is secured.

Constants§

CONFIG_ENV_VAR
DEFAULT_CONFIG_FILE
DEFAULT_SQLITE_PATH