camel_component_api/
lib.rs1pub mod bundle;
11pub mod component;
12pub mod component_context;
13pub mod consumer;
14pub mod endpoint;
15pub mod health_registry;
16pub mod runtime_observability;
17
18pub mod cron_service;
19pub mod network_retry;
20pub mod producer;
21pub mod registrar;
22pub mod template_reload;
23#[cfg(any(test, feature = "test-support"))]
24pub mod test_support;
25pub mod tls_source;
26
27pub use bundle::ComponentBundle;
28pub use component::Component;
29pub use component_context::{ComponentContext, NoOpComponentContext};
30pub use consumer::{
31 ConcurrencyModel, Consumer, ConsumerContext, ConsumerStartupMode, ExchangeEnvelope,
32 SecurityContext, StartupReceiver, StartupSignal,
33};
34pub use endpoint::{Endpoint, PollingConsumer};
35pub use health_registry::{
36 HealthCheckRegistry, NoOpHealthCheckRegistry, noop_health_check_registry,
37};
38pub use runtime_observability::RuntimeObservability;
39
40pub use cron_service::{CronCallback, CronFire, CronSchedule, CronService};
41pub use network_retry::{
42 NetworkRetryPolicy, is_retryable_camel_error, retry_async, retry_async_cancelable,
43};
44pub use producer::ProducerContext;
45pub use registrar::ComponentRegistrar;
46#[cfg(any(test, feature = "test-support"))]
47pub use test_support::{NoopRuntimeObservability, PanicRuntimeObservability};
48
49pub use camel_api::{
51 AsyncHealthCheck, Body, BodyType, BoxProcessor, CamelError, CheckResult, Exchange,
52 HealthStatus, Message, RouteAction, RouteStatus, RuntimeCommand, RuntimeCommandBus,
53 RuntimeCommandResult, RuntimeHandle, RuntimeQuery, RuntimeQueryBus, RuntimeQueryResult,
54 StreamBody, StreamMetadata, Value,
55};
56
57pub use camel_endpoint::{UriComponents, UriConfig, parse_uri};
59pub mod uri {
62 pub fn parse_bool_param(s: &str) -> Result<bool, String> {
65 match s.to_lowercase().as_str() {
66 "true" | "1" | "yes" => Ok(true),
67 "false" | "0" | "no" => Ok(false),
68 _ => Err(format!("invalid boolean value: '{}'", s)),
69 }
70 }
71}