pub trait Transform {
// Required method
fn run<'async_trait>(
self: Box<Self>,
context: TransformContext,
) -> Pin<Box<dyn Future<Output = Result<(), GenericError>> + Send + 'async_trait>>
where Self: 'async_trait;
}
Expand description
A transform.
Transforms sit in the middle of a topology, where events can be manipulated (e.g. sampled, filtered, enriched) before being sent to the next component(s) in the topology. Examples of typical transforms include origin enrichment, aggregation, and sampling.
Required Methods§
Sourcefn run<'async_trait>(
self: Box<Self>,
context: TransformContext,
) -> Pin<Box<dyn Future<Output = Result<(), GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
fn run<'async_trait>(
self: Box<Self>,
context: TransformContext,
) -> Pin<Box<dyn Future<Output = Result<(), GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
Runs the transform.
The transform context provides access primarily to the event stream, used to receive events sent to the transforms, and the forwarder, used to send events to the next component(s) in the topology, as well as other information such as the component context.
Transforms are expected to run indefinitely until their event stream is terminated, or an error occurs.
§Errors
If an unrecoverable error occurs while running, an error is returned.