Crate scsys_config

Source
Expand description

A collection of common configuration primitives and utilities used throughout the scsys-io ecosystem.

Re-exports§

pub use config;

Modules§

consts
constants declared for the configuration module
error
the error module defines the error-handling routines for the crate
prelude
services
the services module provides pre-defined schemas for common services
traits
this module is used to implement various traits supporting the configuration module
types
various types used throughout the configuration module
utils

Macros§

config_sources
create a macro to streamline the process of adding sources

Structs§

DatabaseUriSchema
A standard database connection url schema
EnvironmentIter
An iterator over the variants of Environment
LogLevelIter
An iterator over the variants of LogLevel
LoggerConfig
ModeIter
An iterator over the variants of Mode
NetworkAddr
NetworkConfig
Scope
The Scope struct is a two-part pathlike structure intendend to be used as a configurable mechanism to defining the context and working directory of a service.
StandardDatabaseConfig
The StandardDatabaseConfig type is a configuration structure for a standard database connection.
TracingConfig

Enums§

ConfigError
Environment
LogLevel
Mode
Mode enumerates the possible runtime modes of the application.

Constants§

ARTIFACTS
The standard artifacts directory name
CACHE_DIR
The standard cache directory name
CONFIG_DIR
The standard configuration directory name
DEFAULT_ENV_PREFIX
The default environment variable prefix used for configuration schemas.
DEFAULT_ENV_SEPARATOR
The default environment variable separator used for configuration schemas.

Traits§

Configurable
Configurable trait for types that can be configured with another type, denoted by Configurable::Config.
Configuration
Configuration is used to establish a common interface for all configuration types.
RawConfiguration
The RawConfiguration trait defines the base representation format for all configuration schemas.

Functions§

collect_files_as
A generic function wrapper extending glob::glob
env_or_default
a utility function to get an environment variable or return a default value