pub struct Settings {
Show 14 fields pub env: String, pub debug: bool, pub http: HttpSettings, pub provider_settings: ProviderSettings, pub suggestion_providers: HashMap<String, SuggestionProviderConfig>, pub logging: LoggingSettings, pub metrics: MetricsSettings, pub sentry: SentrySettings, pub public_documentation: Option<Uri>, pub redis: RedisSettings, pub remote_settings: RemoteSettingsGlobalSettings, pub location: LocationSettings, pub log_full_request: bool, pub elasticsearch: ElasticsearchSettings,
}
Expand description

Top level settings object for Merino.

Fields

env: String

The environment Merino is running in. Should only be set with the MERINO__ENV environment variable.

debug: bool

Enable additional features to debug the application. This should not be set to true in production environments.

http: HttpSettings

Settings for the HTTP server.

provider_settings: ProviderSettings

Settings for the suggestion providers

suggestion_providers: HashMap<String, SuggestionProviderConfig>

Providers to use to generate suggestions

logging: LoggingSettings

Logging settings.

metrics: MetricsSettings

Metrics settings.

sentry: SentrySettings

Settings for error reporting via Sentry.

public_documentation: Option<Uri>

URL to redirect curious users to, that explains what this service is. Preferable a public wiki page. Optional.

redis: RedisSettings

Settings for connecting to Redis.

remote_settings: RemoteSettingsGlobalSettings

Settings for connecting to Remote Settings.

location: LocationSettings

Settings to use when determining the location associated with requests.

log_full_request: bool

If on, log the entire suggestion request object as a part of the tracing log, including the search query. When the setting is off, the suggest request object should be logged, but the search query should be blank.

elasticsearch: ElasticsearchSettings

Implementations

Load settings from configuration files and environment variables.

Errors

If any of the configured values are invalid, or if any of the required configuration files are missing.

Load settings from configuration files for tests.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more