agent_data_plane_config_system/lib.rs
1//! The configuration system: translation and subscription of external configuration sources into
2//! an ADP-typed model.
3//!
4//! This crate turns configuration sources into `SalukiConfiguration`:
5//!
6//! - the typed Datadog source (`DatadogConfiguration`), whose supported keys the generated `drive`
7//! feeds to `DatadogTranslator` (a `DatadogConfigWitness`) one key at a time, and
8//! - the Saluki-schema-only source (`SalukiOnly`), whose values seed the fields the Datadog schema
9//! does not cover.
10//!
11//! [`ConfigurationSystem`] is the entry point: it translates a raw source map into the initial
12//! configuration and, when the map streams updates, keeps that configuration current. This is the
13//! only ADP production crate that bridges the source configuration to the model; it constructs no
14//! components and does not depend on `saluki-components`.
15//!
16//! Sources are layered as `SourceTree`s, which keep each value together with the provenance of that
17//! value. That is what lets a configuration producer's own defaults be layered over local
18//! configuration without shadowing it, and what lets translation resolve a setting whose meaning
19//! depends on whether it was set explicitly.
20
21mod env_provider;
22mod loaded;
23mod saluki_env_overlay;
24mod saluki_only;
25mod source;
26mod system;
27mod translators;
28
29pub use env_provider::EnvironmentProvider;
30pub use loaded::{EnvPrecedence, LoadedConfiguration};
31pub use system::{ConfigurationSystem, Error};