process method
Implementation
Future<RawEvent?> process(RawEvent incomingEvent) async {
final beforeResult = await _queue.enqueue(() async {
return await applyPlugins(PluginType.before, incomingEvent);
});
if (beforeResult == null) {
return null;
}
final enrichmentResult = await applyPlugins(PluginType.enrichment, beforeResult);
if (enrichmentResult == null) {
return null;
}
await applyPlugins(PluginType.destination, enrichmentResult);
final afterResult = await applyPlugins(PluginType.after, enrichmentResult);
return afterResult;
}