mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
Add global metrics registry, pass to BeaconState
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use iron::typemap::Key;
|
||||
use prometheus::Registry;
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -10,3 +11,9 @@ pub struct BeaconChainKey<T> {
|
||||
impl<T: BeaconChainTypes + 'static> Key for BeaconChainKey<T> {
|
||||
type Value = Arc<BeaconChain<T>>;
|
||||
}
|
||||
|
||||
pub struct MetricsRegistryKey;
|
||||
|
||||
impl Key for MetricsRegistryKey {
|
||||
type Value = Registry;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user