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

A callable that can handle monitoring events. More...

#include <monitoring_concepts.h>

Concept definition

template<typename H, typename E>
std::invocable<H, const E&> && std::is_void_v<std::invoke_result_t<H, const E&>>
A callable that can handle monitoring events.

Detailed Description

A callable that can handle monitoring events.

Event handlers receive events by const reference and return void.

Example usage:

template<MonitoringEventType E, MonitoringEventHandler<E> H>
void subscribe(H&& handler) {
event_bus_->subscribe<E>(std::forward<H>(handler));
}

Definition at line 177 of file monitoring_concepts.h.