pub struct MetricsQueryAccess { /* private fields */ }Expand description
The live in-process access backend. Cheap to construct (wraps the
shared Arc).
Implementations§
Source§impl MetricsQueryAccess
impl MetricsQueryAccess
Sourcepub fn new(query: Arc<MetricsQuery>) -> Self
pub fn new(query: Arc<MetricsQuery>) -> Self
Wrap the session’s live metrics query.
Sourcepub fn earliest_ms(&self) -> Option<i64>
pub fn earliest_ms(&self) -> Option<i64>
SRD-90 §M5 — the oldest sample-time this in-memory tier can answer
(Unix-ms), for the super::HybridStore coverage walk: the minimum
captured_at across every component’s smallest-cadence retention ring,
converted on the same clock as Self::select_range. None when
nothing is retained yet (empty store / no cadence) — the hybrid then
never short-circuits the colder tail.
Trait Implementations§
Source§impl HorizonAware for MetricsQueryAccess
impl HorizonAware for MetricsQueryAccess
fn earliest_ms(&self) -> Option<i64>
Source§impl MetricAccess for MetricsQueryAccess
impl MetricAccess for MetricsQueryAccess
Source§fn select_range(
&self,
matchers: &[Matcher],
start_ms: i64,
end_ms: i64,
) -> Result<Vector, QueryError>
fn select_range( &self, matchers: &[Matcher], start_ms: i64, end_ms: i64, ) -> Result<Vector, QueryError>
Range selection: series matching every
matcher, with every
sample in [start_ms, end_ms] (ascending). Yields a range
vector — the input a rollup (rate(m[w]), *_over_time)
consumes. This is the one required method; select_instant
derives from it.Source§fn select_instant(
&self,
matchers: &[Matcher],
at_ms: i64,
lookback_ms: Option<i64>,
) -> Result<Vector, QueryError>
fn select_instant( &self, matchers: &[Matcher], at_ms: i64, lookback_ms: Option<i64>, ) -> Result<Vector, QueryError>
Instant selection: series matching every
matcher, each reduced
to its latest sample within [at_ms - lookback, at_ms] (the
PromQL stale-tolerance window; lookback_ms = None means a
strict [at_ms, at_ms]). Yields an instant vector — one sample
per series. Read moreAuto Trait Implementations§
impl Freeze for MetricsQueryAccess
impl RefUnwindSafe for MetricsQueryAccess
impl Send for MetricsQueryAccess
impl Sync for MetricsQueryAccess
impl Unpin for MetricsQueryAccess
impl UnsafeUnpin for MetricsQueryAccess
impl UnwindSafe for MetricsQueryAccess
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more