pub struct RegistryComponentContext { /* private fields */ }Expand description
Adapter that lets Registry participate as a ComponentContext.
Wraps the shared Arc<Mutex<Registry>> and delegates resolve_component
to Registry::get. The metrics collector is threaded in from the
composition root (camel-cli) at construction; it is the ADR-0066
late-bound handle, not a backend snapshot, so late registrations flow
through camel_component_api::ComponentContext::metrics without
re-snapshotting. The
components-lever snapshot gates only the component-operations family —
the error family is never lever-gated. When no collector is wired
(e.g. compile-time security scan, standalone examples without a
live context), construction resolves
camel_api::NoOpMetrics.
Implementations§
Trait Implementations§
Source§impl ComponentContext for RegistryComponentContext
impl ComponentContext for RegistryComponentContext
Source§fn resolve_component(&self, scheme: &str) -> Option<Arc<dyn Component>>
fn resolve_component(&self, scheme: &str) -> Option<Arc<dyn Component>>
Resolve a component by scheme.
Source§fn resolve_language(&self, _name: &str) -> Option<Arc<dyn Language>>
fn resolve_language(&self, _name: &str) -> Option<Arc<dyn Language>>
Resolve a language by name.
Source§fn component_metrics_enabled(&self) -> bool
fn component_metrics_enabled(&self) -> bool
Snapshot of the
[observability.metrics].components lever —
gates only the uniform component-operations family served through
RuntimeObservability::component_metrics(); error-family
emission is never lever-gated. Default false (opt-in);
CamelContext overrides this with its MetricsLeversConfig
snapshot.Source§fn platform_service(&self) -> Arc<dyn PlatformService> ⓘ
fn platform_service(&self) -> Arc<dyn PlatformService> ⓘ
Access the active platform service.
fn register_route_health_check( &self, _route_id: &str, _check: Arc<dyn AsyncHealthCheck>, )
fn unregister_route_health_check(&self, _route_id: &str)
Source§fn health(&self) -> Arc<dyn HealthCheckRegistry> ⓘ
fn health(&self) -> Arc<dyn HealthCheckRegistry> ⓘ
Access the active health-check registry. Read more
fn route_id(&self) -> Option<&str>
fn register_current_route_health_check(&self, check: Arc<dyn AsyncHealthCheck>)
Auto Trait Implementations§
impl !RefUnwindSafe for RegistryComponentContext
impl !UnwindSafe for RegistryComponentContext
impl Freeze for RegistryComponentContext
impl Send for RegistryComponentContext
impl Sync for RegistryComponentContext
impl Unpin for RegistryComponentContext
impl UnsafeUnpin for RegistryComponentContext
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> RuntimeObservability for Twhere
T: ComponentContext,
impl<T> RuntimeObservability for Twhere
T: ComponentContext,
Source§fn metrics(&self) -> Arc<dyn MetricsCollector> ⓘ
fn metrics(&self) -> Arc<dyn MetricsCollector> ⓘ
Active metrics collector. Used for
increment_errors(route_id, label)
per ADR-0012 categories (b′) and (e).Source§fn health(&self) -> Arc<dyn HealthCheckRegistry> ⓘ
fn health(&self) -> Arc<dyn HealthCheckRegistry> ⓘ
Active health-check registry. Used for
force_unhealthy_for_route(route_id, name, reason) per ADR-0012
category (g).Source§fn component_metrics(&self) -> ComponentMetrics
fn component_metrics(&self) -> ComponentMetrics
Facade for the uniform component-operations family
(
camel_component_operations_total{component,operation,outcome},
dashboard-observability Task 4.1). The lever snapshot is baked in
at facade construction: the component series flow only with the
[observability.metrics].components lever on, while failures
always reach the non-disableable error family. Read more