global: snapshot

This commit is contained in:
nym21
2026-02-24 12:21:20 +01:00
parent 3b7aa8242a
commit cefc8cfd42
24 changed files with 3561 additions and 1073 deletions
@@ -57,6 +57,20 @@ impl BrkClient {{
index,
)
}}
/// Create a dynamic date-based metric endpoint builder.
///
/// Returns `Err` if the index is not date-based.
pub fn date_metric(&self, metric: impl Into<Metric>, index: Index) -> Result<DateMetricEndpointBuilder<serde_json::Value>> {{
if !index.is_date_based() {{
return Err(BrkError {{ message: format!("{{}} is not a date-based index", index.name()) }});
}}
Ok(DateMetricEndpointBuilder::new(
self.base.clone(),
Arc::from(metric.into().as_str()),
index,
))
}}
"#,
VERSION = VERSION
)