Module: Contrast::Components::Config

Defined in:
lib/contrast/components/config.rb

Overview

This component encapsulates reference to the configuration file. At the time of writing, the configuration file is a yaml file reflecting the ‘common agent configuration’ specification. ‘Config’ and ‘configuration’ are to be interpreted as referring specifically to these files and specifications, they are not generic terms for other avenues of user configuration.

This component is responsible for…

- encapsulating file access & concomitant error conditions
- implementing validity checks with respect to the specification
- memoizing/streamline field accesses

Config fails fast. if it’s not valid, the agent should break, and it should break LOUDLY. Better to waste half an hour of the sysadmin’s time than to silently fail to deliver functionality.

Defined Under Namespace

Classes: Interface

Constant Summary collapse

CONTRAST_ENV_MARKER =
'CONTRAST__'
COMPONENT_INTERFACE =
Interface.new