Expand description

Merino Settings

The top level settings struct is Settings. If you are looking for documentation about the settings that can be set, start there.

Configuration is specified in several ways, with later methods overriding earlier ones.

  1. A base configuration checked into the repository, in config/base.yaml. This provides the default values for most settings.
  2. Per-environment configuration files in the config directory. The environment is selected using the environment variable MERINO__ENV. The settings for that environment are then loaded from config/${env}.yaml, if it exists. The default environment is “development”. A “production” environment is also provided.
  3. A local configuration file not checked into the repository, at config/local.yaml. This file is in .gitignore and is safe to use for local configuration and secrets if desired.
  4. Environment variables that begin with MERINO and use __ as a level separator. For example, Settings::http::workers can be controlled from the environment variable MERINO__HTTP__WORKERS.

Tests should use Settings::load_for_test which only reads from config/base.yaml, config/test.yaml, and config/local_test.yaml (if it exists). It does not read from environment variables.

Configuration files are canonically YAML files. However, any format supported by the config crate can be used, including JSON and TOML. To choose another format, simply use a different extension for your file, like config/local.toml.

Re-exports

pub use crate::providers::SuggestionProviderConfig;

Modules

logging 🔒
redis 🔒

Structs

Enums

Top-level settings for suggestion providers.

Settings for the error and event reporting system Sentry.