Skip to main content

ConfigCheck

Trait ConfigCheck 

Source
pub trait ConfigCheck: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn description(&self) -> &'static str;
    fn run(&self) -> Result<(), CamelError>;
}
Expand description

A single startup-time configuration check.

Each ConfigCheck is run as part of the fail-closed startup-validation phase established by ADR-0033. The check owns a name (for error reporting), a human description, and a synchronous run that returns Ok(()) if the check passes or Err(CamelError::Config) if the check fails and the operator config is invalid.

Required Methods§

Source

fn name(&self) -> &'static str

Stable identifier for this check (e.g. "grpc-tls", "sql-dynamic-query"). Used in error messages and camel doctor output.

Source

fn description(&self) -> &'static str

One-line human description of what this check enforces.

Source

fn run(&self) -> Result<(), CamelError>

Run the check. Returns Err(CamelError::Config(_)) to fail-closed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§