Trait influxc::Backlog[][src]

pub trait Backlog: Debug + Send + Sync {
    fn read_pending(&mut self) -> Result<Vec<Record>, InfluxError>;
fn write_pending(&mut self, record: &Record) -> Result<(), InfluxError>;
fn truncate_pending(&mut self, record: &Record) -> Result<(), InfluxError>; }

API definition that any backlog service needs to abide by so the Client can use it.

Required methods

fn read_pending(&mut self) -> Result<Vec<Record>, InfluxError>[src]

Return any pending records that sits in backlog and requires to be commited.

fn write_pending(&mut self, record: &Record) -> Result<(), InfluxError>[src]

Write records that could not be commited, so they get written into backlog for future processing.

fn truncate_pending(&mut self, record: &Record) -> Result<(), InfluxError>[src]

Empty backlog from pending records. This gets called once all pending records have been successfully commited.

Loading content...

Implementors

Loading content...