camel_component_grpc/
bundle.rs1use std::sync::Arc;
2
3use camel_component_api::{CamelError, ComponentBundle, ComponentRegistrar};
4
5use crate::component::GrpcComponent;
6
7pub struct GrpcBundle;
8
9impl ComponentBundle for GrpcBundle {
10 fn config_key() -> &'static str {
11 "grpc"
12 }
13
14 fn from_toml(_value: toml::Value) -> Result<Self, CamelError> {
15 Ok(Self)
16 }
17
18 fn register_all(self, ctx: &mut dyn ComponentRegistrar) {
19 ctx.register_component_dyn(Arc::new(GrpcComponent::new()));
20 }
21}