MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / apply_offset

Function apply_offset

nodedb/src/control/promql/parser.rs:415–424  ·  view source on GitHub ↗
(expr: Expr, offset: Duration)

Source from the content-addressed store, hash-verified

413}
414
415fn apply_offset(expr: Expr, offset: Duration) -> Expr {
416 match expr {
417 Expr::VectorSelector { name, matchers, .. } => Expr::VectorSelector {
418 name,
419 matchers,
420 offset: Some(offset),
421 },
422 other => other,
423 }
424}
425
426fn parse_agg_op(name: &str) -> Option<AggOp> {
427 match name.to_ascii_lowercase().as_str() {

Callers 1

parse_postfixMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected