pub trait PromStoreProtocolHandler {
// Required methods
fn pre_write<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 RowInsertRequests,
ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn write_prepared<'life0, 'async_trait>(
&'life0 self,
request: RowInsertRequests,
ctx: QueryContextRef,
with_metric_engine: bool,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn write<'life0, 'async_trait>(
&'life0 self,
request: RowInsertRequests,
ctx: QueryContextRef,
with_metric_engine: bool,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn write_all<'life0, 'async_trait>(
&'life0 self,
requests: Vec<(QueryContextRef, RowInsertRequests)>,
with_metric_engine: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Output>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read<'life0, 'async_trait>(
&'life0 self,
request: ReadRequest,
ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<PromStoreResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ingest_metrics<'life0, 'async_trait>(
&'life0 self,
metrics: Metrics,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
Sourcefn pre_write<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 RowInsertRequests,
ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pre_write<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 RowInsertRequests,
ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Runs pre-write checks/hooks for prometheus remote write requests.
Sourcefn write_prepared<'life0, 'async_trait>(
&'life0 self,
request: RowInsertRequests,
ctx: QueryContextRef,
with_metric_engine: bool,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_prepared<'life0, 'async_trait>(
&'life0 self,
request: RowInsertRequests,
ctx: QueryContextRef,
with_metric_engine: bool,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Writes one batch after Self::pre_write has succeeded for the entire request.
Sourcefn write<'life0, 'async_trait>(
&'life0 self,
request: RowInsertRequests,
ctx: QueryContextRef,
with_metric_engine: bool,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write<'life0, 'async_trait>(
&'life0 self,
request: RowInsertRequests,
ctx: QueryContextRef,
with_metric_engine: bool,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handling prometheus remote write requests
Sourcefn write_all<'life0, 'async_trait>(
&'life0 self,
requests: Vec<(QueryContextRef, RowInsertRequests)>,
with_metric_engine: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Output>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_all<'life0, 'async_trait>(
&'life0 self,
requests: Vec<(QueryContextRef, RowInsertRequests)>,
with_metric_engine: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Output>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Checks every batch before writing any of them.