Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
kcenon::monitoring::concepts::MetricSourceLike Concept Reference

A type that can provide metrics. More...

#include <monitoring_concepts.h>

Concept definition

template<typename T>
concept kcenon::monitoring::concepts::MetricSourceLike = requires(const T t) {
{ t.get_current_metrics() };
{ t.get_source_name() } -> std::convertible_to<std::string>;
{ t.is_healthy() } -> std::convertible_to<bool>;
}

Detailed Description

A type that can provide metrics.

Metric sources provide current metrics and source identification.

Example usage:

template<MetricSourceLike S>
void collect_from(const S& source) {
auto metrics = source.get_current_metrics();
// Process metrics
}

Metric sources provide current metrics and source identification.

Definition at line 98 of file monitoring_concepts.h.