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;
// Provided methods
fn prepare_metric_write<'life0, 'async_trait>(
&'life0 self,
_request: RowInsertRequests,
_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<PreparedMetricInserts>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn write_prepared_metric<'life0, 'async_trait>(
&'life0 self,
_request: PreparedMetricInserts,
_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn write_exemplars_with_sources<'life0, 'life1, 'async_trait>(
&'life0 self,
request: RowInsertRequests,
ctx: QueryContextRef,
_sources: &'life1 [TableInfoRef],
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn check_exemplar_sources<'life0, 'life1, 'async_trait>(
&'life0 self,
_sources: &'life1 BTreeSet<String>,
_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn write_exemplars_prepared<'life0, 'async_trait>(
&'life0 self,
_request: RowInsertRequests,
_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: Sync + '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.
Provided Methods§
Sourcefn prepare_metric_write<'life0, 'async_trait>(
&'life0 self,
_request: RowInsertRequests,
_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<PreparedMetricInserts>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn prepare_metric_write<'life0, 'async_trait>(
&'life0 self,
_request: RowInsertRequests,
_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<PreparedMetricInserts>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Resolves metric destinations before source identities are attached to exemplars. Requires pre-write checks and admission to have succeeded for the entire request.
Sourcefn write_prepared_metric<'life0, 'async_trait>(
&'life0 self,
_request: PreparedMetricInserts,
_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn write_prepared_metric<'life0, 'async_trait>(
&'life0 self,
_request: PreparedMetricInserts,
_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Executes the same routed metric writes used to resolve exemplar source identities.
Sourcefn write_exemplars_with_sources<'life0, 'life1, 'async_trait>(
&'life0 self,
request: RowInsertRequests,
ctx: QueryContextRef,
_sources: &'life1 [TableInfoRef],
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_exemplars_with_sources<'life0, 'life1, 'async_trait>(
&'life0 self,
request: RowInsertRequests,
ctx: QueryContextRef,
_sources: &'life1 [TableInfoRef],
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Writes exemplars using table identities captured while preparing the source metrics.
Sourcefn check_exemplar_sources<'life0, 'life1, 'async_trait>(
&'life0 self,
_sources: &'life1 BTreeSet<String>,
_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_exemplar_sources<'life0, 'life1, 'async_trait>(
&'life0 self,
_sources: &'life1 BTreeSet<String>,
_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Authorizes source series, including inputs with no metric samples.
fn write_exemplars_prepared<'life0, 'async_trait>(
&'life0 self,
_request: RowInsertRequests,
_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".