Module config

Module config 

Source
Expand description

Configuration for the objectstore server.

This module provides the configuration system for the objectstore HTTP server. Configuration can be loaded from multiple sources with the following precedence (highest to lowest):

  1. Environment variables (prefixed with OS__)
  2. YAML configuration file (specified via -c or --config flag)
  3. Defaults

See Config for a description of all configuration fields and their defaults.

§Environment Variables

Environment variables use OS__ as a prefix and double underscores (__) to denote nested configuration structures. For example:

  • OS__HTTP_ADDR=0.0.0.0:8888 sets the HTTP server address
  • OS__LONG_TERM_STORAGE__TYPE=filesystem sets the storage type
  • OS__LONG_TERM_STORAGE__PATH=/data sets the directory name

§YAML Configuration File

Configuration can also be provided via a YAML file. The above configuration in YAML format would look like this:

http_addr: 0.0.0.0:8888

long_term_storage:
  type: filesystem
  path: /data

Structs§

Config
Main configuration struct for the objectstore server.
ConfigSecret
Newtype around String that may protect against accidental logging of secrets in our configuration struct. Use with [secrecy::SecretBox].
FormatParseError
The logging format parse error.
Logging
Logging configuration.
Metrics
Metrics configuration.
Runtime
Runtime configuration for the Tokio async runtime.
Sentry
Sentry error tracking and performance monitoring configuration.

Enums§

LogFormat
Log output format.
Storage
Storage backend configuration.