Enum nakadion::ProcessingStatus
[−]
[src]
pub enum ProcessingStatus { Processed(Option<usize>), Failed { reason: String, }, }
This struct must be returned after processing a batch to tell nakadion how to continue.
Variants
Processed(Option<usize>)
The cursor of the just processed batch can be committed to make progrss on the stream.
Optionally the number of processed events can be provided to help with deciding on when to commit the cursor.
The number of events should be the number of events that were in the batch.
Failed
Processing failed. Do not commit the cursor. This always ends in the streaming being aborted for the current stream.
A reason must be given which will be logged.
Fields of Failed
reason: String |
Methods
impl ProcessingStatus
[src]
pub fn processed_no_hint() -> ProcessingStatus
[src]
Cursor can be committed and no information on how many events were processed is given.
pub fn processed(num_events_hint: usize) -> ProcessingStatus
[src]
Cursor can be committed and a hint on how many events were processed is given.
pub fn failed<T: Into<String>>(reason: T) -> ProcessingStatus
[src]
Processing events failed with the given reason.