pub struct MetricsSystem { /* private fields */ }Expand description
System that processes metrics events with hooks
This system:
- Processes metric definition requests
- Processes metric recording requests
- Processes snapshot and report generation requests
- Calls hooks for custom behavior
- Publishes state change events for network replication
Implementations§
Source§impl MetricsSystem
impl MetricsSystem
Sourcepub fn new(hook: Arc<dyn MetricsHook>) -> Self
pub fn new(hook: Arc<dyn MetricsHook>) -> Self
Create a new MetricsSystem with a custom hook
Sourcepub async fn process_events(
&mut self,
_services: &ServiceContext,
resources: &mut ResourceContext,
)
pub async fn process_events( &mut self, _services: &ServiceContext, resources: &mut ResourceContext, )
Process all metrics events
Trait Implementations§
Source§impl Clone for MetricsSystem
impl Clone for MetricsSystem
Source§fn clone(&self) -> MetricsSystem
fn clone(&self) -> MetricsSystem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl System for MetricsSystem
impl System for MetricsSystem
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast to Any for type-safe mutable access
Auto Trait Implementations§
impl !RefUnwindSafe for MetricsSystem
impl !UnwindSafe for MetricsSystem
impl Freeze for MetricsSystem
impl Send for MetricsSystem
impl Sync for MetricsSystem
impl Unpin for MetricsSystem
impl UnsafeUnpin for MetricsSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Component for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more