MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / get_state

Function get_state

chirpstack/src/storage/metrics.rs:168–176  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

166}
167
168pub async fn get_state(name: &str) -> Result<String> {
169 let key = redis_key(format!("metrics:{{{}}}", name));
170
171 let v: Option<String> = redis::cmd("GET")
172 .arg(key)
173 .query_async(&mut get_async_redis_conn().await?)
174 .await?;
175 Ok(v.unwrap_or_default())
176}
177
178pub async fn get(
179 name: &str,

Callers 1

get_metricsMethod · 0.85

Calls 2

redis_keyFunction · 0.85
get_async_redis_connFunction · 0.85

Tested by

no test coverage detected