agentsight_capture/runners/
mod.rs1use crate::event::Event;
5use async_trait::async_trait;
6use futures::stream::Stream;
7use std::pin::Pin;
8
9pub type EventStream = Pin<Box<dyn Stream<Item = Event> + Send>>;
11
12pub type RunnerError = Box<dyn std::error::Error + Send + Sync>;
14
15#[async_trait]
17pub trait Runner: Send + Sync {
18 async fn run(&mut self) -> Result<EventStream, RunnerError>;
20
21 fn add_analyzer(self, analyzer: Box<dyn crate::analyzers::Analyzer>) -> Self
23 where
24 Self: Sized;
25}
26
27pub mod agent;
28pub mod common;
29#[cfg(test)]
30pub mod fake;
31pub mod process;
32pub mod system;
33
34pub use agent::AgentRunner;
35pub use common::BinaryRunner;
36#[cfg(test)]
37pub use fake::FakeRunner;
38pub use process::ProcessRunner;
39pub use system::SystemRunner;