Trait nakadion::Handler
[−]
[src]
pub trait Handler: Send + Sync { fn handle(&self, batch: &str, info: BatchInfo) -> AfterBatchAction; }
Handles batches of events received from Nakadi
.
Required Methods
fn handle(&self, batch: &str, info: BatchInfo) -> AfterBatchAction
Handle the batch of events. The supplied string contains
the whole batch of events as a JSOS
array.
Return an AfterBatchAction
to tell what to do next.
The batch array may be empty.
You may not panic within the handler.