pub trait LineProtocolInterceptor {
type Error: ErrorExt;
// Provided methods
fn pre_execute(
&self,
_line: &str,
_query_ctx: QueryContextRef,
) -> Result<(), Self::Error> { ... }
fn post_lines_conversion<'life0, 'async_trait>(
&'life0 self,
requests: RowInsertRequests,
query_context: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<RowInsertRequests, Self::Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
LineProtocolInterceptor can track life cycle of a line protocol request and customize or abort its execution at given point.
Required Associated Types§
Provided Methods§
fn pre_execute( &self, _line: &str, _query_ctx: QueryContextRef, ) -> Result<(), Self::Error>
sourcefn post_lines_conversion<'life0, 'async_trait>(
&'life0 self,
requests: RowInsertRequests,
query_context: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<RowInsertRequests, Self::Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn post_lines_conversion<'life0, 'async_trait>(
&'life0 self,
requests: RowInsertRequests,
query_context: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<RowInsertRequests, Self::Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Called after the lines are converted to the [RowInsertRequests]. We can then modify the resulting requests if needed. Typically used in some backward compatibility situation.