pub struct CamelConfig {
pub routes: Vec<String>,
pub watch: bool,
pub runtime_journal_path: Option<String>,
pub log_level: String,
pub timeout_ms: u64,
pub components: ComponentsConfig,
pub observability: ObservabilityConfig,
pub supervision: Option<SupervisionCamelConfig>,
}Fields§
§routes: Vec<String>§watch: boolEnable file-watcher hot-reload. Defaults to false.
Can be overridden per profile in Camel.toml or via --watch / --no-watch CLI flags.
runtime_journal_path: Option<String>Optional stable runtime journal path for CQRS event durability/replay.
When unset, runtime durability/replay is disabled and runtime state is ephemeral.
log_level: String§timeout_ms: u64§components: ComponentsConfig§observability: ObservabilityConfig§supervision: Option<SupervisionCamelConfig>Implementations§
Source§impl CamelConfig
impl CamelConfig
pub fn from_file(path: &str) -> Result<Self, ConfigError>
pub fn from_file_with_env(path: &str) -> Result<Self, ConfigError>
pub fn from_file_with_profile( path: &str, profile: Option<&str>, ) -> Result<Self, ConfigError>
pub fn from_file_with_profile_and_env( path: &str, profile: Option<&str>, ) -> Result<Self, ConfigError>
pub fn from_env_or_default() -> Result<Self, ConfigError>
Source§impl CamelConfig
impl CamelConfig
Sourcepub fn load_routes(path: &str) -> Result<Vec<RouteDefinition>, CamelError>
pub fn load_routes(path: &str) -> Result<Vec<RouteDefinition>, CamelError>
Load routes from config file and return them (without adding to context yet) This allows components to be registered before routes are resolved
Sourcepub fn configure_context(
config: &CamelConfig,
) -> Result<CamelContext, CamelError>
pub fn configure_context( config: &CamelConfig, ) -> Result<CamelContext, CamelError>
Create a CamelContext configured from this CamelConfig.
Always installs a unified tracing subscriber (Layers 1–3, plus Layer 4
when OTel is enabled). OtelService, if present, only manages providers —
it never installs a subscriber.
Trait Implementations§
Source§impl Clone for CamelConfig
impl Clone for CamelConfig
Source§fn clone(&self) -> CamelConfig
fn clone(&self) -> CamelConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CamelConfig
impl Debug for CamelConfig
Source§impl<'de> Deserialize<'de> for CamelConfig
impl<'de> Deserialize<'de> for CamelConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CamelConfig
impl !RefUnwindSafe for CamelConfig
impl Send for CamelConfig
impl Sync for CamelConfig
impl Unpin for CamelConfig
impl UnsafeUnpin for CamelConfig
impl !UnwindSafe for CamelConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request