kinetic/transforms/mod.rs
1use async_trait::async_trait;
2use tokio::task::JoinHandle;
3
4pub mod aggregate;
5pub mod filter;
6pub mod otel_aggregate;
7pub mod sample;
8pub mod sql_map;
9pub mod util;
10pub mod wasm;
11
12#[async_trait]
13pub trait Transform: Send {
14 async fn run(self: Box<Self>);
15
16 fn spawn(self: Box<Self>) -> JoinHandle<()>
17 where
18 Self: 'static,
19 {
20 tokio::spawn(async move {
21 self.run().await;
22 })
23 }
24}