Crate wireman_config

Source
Expand description

Configuration module for WireMan.

This module provides functionality for defining and reading the configuration for WireMan. The config file is read from a JSON file to customize WireMan.

The config contains:

  • includes: A list of include directories for gRPC.
  • files: A list of .proto files to include.
  • server
    • default_address: The default address of the gRPC server.
    • default_auth_header: The default authentication header.
  • history
    • directory: The folder path where the history should be kept

Re-exports§

pub use config::Config;

Modules§

cli
config
error

Constants§

CONFIG_FNAME
The wireman config filename
DEFAULT_CONFIG_DIR
The default wireman config directory. TOOD: Use the config_dir crate to determine the default based on the operating system
ENV_CONFIG_DIR
This env is used to read the path for the WireMan config. If it is not set, the config is expected in the current directory.

Functions§

init_from_env
Initializes the Config from environment variables