Skip to main content

BatchFlusher

Trait BatchFlusher 

Source
pub trait BatchFlusher:
    Send
    + Sync
    + 'static {
    // Required method
    fn flush<'life0, 'life1, 'async_trait>(
        &'life0 self,
        entries: &'life1 [Value],
    ) -> Pin<Box<dyn Future<Output = Result<(), FlushError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Delivers a batch of log entries downstream (HTTP endpoint, file, syslog, …). Implemented by each logger plugin; the batching, timing, and retry logic all live in BatchSink.

Required Methods§

Source

fn flush<'life0, 'life1, 'async_trait>( &'life0 self, entries: &'life1 [Value], ) -> Pin<Box<dyn Future<Output = Result<(), FlushError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Attempts to deliver entries. On partial success, return a FlushError with first_fail set so the sink retries only the undelivered tail.

Implementors§