pub trait DynPipeline: Send + Sync {
// Required methods
fn start(&mut self) -> BoxFuture<'_, Result<(), IronpostError>>;
fn stop(&mut self) -> BoxFuture<'_, Result<(), IronpostError>>;
fn health_check(&self) -> BoxFuture<'_, HealthStatus>;
}Expand description
dyn-compatible 파이프라인 trait
Pipeline trait은 RPITIT를 사용하므로 dyn Pipeline이 불가합니다.
DynPipeline은 BoxFuture를 반환하여 Vec<Box<dyn DynPipeline>>으로
모듈을 동적 관리할 수 있게 합니다.
§구현 예시
ⓘ
// Pipeline을 구현한 타입은 blanket impl으로 자동으로 DynPipeline도 구현됩니다.
let modules: Vec<Box<dyn DynPipeline>> = vec![
Box::new(ebpf_pipeline),
Box::new(log_pipeline),
];Required Methods§
Sourcefn health_check(&self) -> BoxFuture<'_, HealthStatus>
fn health_check(&self) -> BoxFuture<'_, HealthStatus>
모듈의 현재 상태를 확인합니다.