Shared reference to conversion rate metric value (#1034)

* shared conversion rate metric value

* clippy
This commit is contained in:
Svyatoslav Nikolsky
2021-06-29 14:24:54 +03:00
committed by Bastian Köcher
parent db0216dabb
commit ecd20d9d24
23 changed files with 260 additions and 161 deletions
+4
View File
@@ -21,12 +21,16 @@ pub use substrate_prometheus_endpoint::{
register, Counter, CounterVec, Gauge, GaugeVec, Opts, PrometheusError, Registry, F64, U64,
};
use async_std::sync::{Arc, RwLock};
use async_trait::async_trait;
use std::{fmt::Debug, time::Duration};
mod float_json_value;
mod global;
/// Shared reference to `f64` value that is updated by the metric.
pub type F64SharedRef = Arc<RwLock<Option<f64>>>;
/// Unparsed address that needs to be used to expose Prometheus metrics.
#[derive(Debug, Clone)]
pub struct MetricsAddress {