Skip to main content

agentsight_capture_core/runners/
mod.rs

1// SPDX-License-Identifier: MIT
2// Copyright (c) 2026 eunomia-bpf org.
3
4use 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>>;
10pub type RunnerError = Box<dyn std::error::Error + Send + Sync>;
11
12#[async_trait]
13pub trait Runner: Send + Sync {
14    async fn run(&mut self) -> Result<EventStream, RunnerError>;
15
16    fn add_analyzer(self, analyzer: Box<dyn crate::analyzers::Analyzer>) -> Self
17    where
18        Self: Sized;
19}
20
21pub mod agent;
22pub mod common;
23#[cfg(any(test, feature = "test-support"))]
24pub mod fake;
25pub mod process;
26
27pub use agent::AgentRunner;
28pub use common::BinaryRunner;
29#[cfg(any(test, feature = "test-support"))]
30pub use fake::FakeRunner;
31pub use process::ProcessRunner;