|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
Event for publishing network metrics via EventBus. More...
#include <network_metric_event.h>

Public Member Functions | |
| network_metric_event (const std::string &metric_name, double metric_value, network_metric_type metric_type=network_metric_type::counter, const std::map< std::string, std::string > &metric_labels={}, const std::string &metric_unit="") | |
| Construct a network metric event. | |
| network_metric_event () | |
| Default constructor. | |
| network_metric_event (const network_metric_event &)=default | |
| Copy constructor (required for EventType concept) | |
| network_metric_event & | operator= (const network_metric_event &)=default |
| Copy assignment operator. | |
| network_metric_event (network_metric_event &&) noexcept=default | |
| Move constructor. | |
| network_metric_event & | operator= (network_metric_event &&) noexcept=default |
| Move assignment operator. | |
Public Attributes | |
| std::string | name |
| double | value |
| std::string | unit |
| network_metric_type | type |
| std::chrono::steady_clock::time_point | timestamp |
| std::map< std::string, std::string > | labels |
Event for publishing network metrics via EventBus.
This event satisfies common_system's EventType concept and can be published to the EventBus for consumption by external systems like monitoring_system.
Example usage:
Definition at line 54 of file network_metric_event.h.
|
inlineexplicit |
Construct a network metric event.
| metric_name | Metric name |
| metric_value | Metric value |
| metric_type | Type of metric (default: counter) |
| metric_labels | Additional labels/tags (default: empty) |
| metric_unit | Unit of measurement (default: empty) |
Definition at line 71 of file network_metric_event.h.
|
inline |
Default constructor.
Definition at line 89 of file network_metric_event.h.
|
default |
Copy constructor (required for EventType concept)
|
defaultnoexcept |
Move constructor.
|
default |
Copy assignment operator.
|
defaultnoexcept |
Move assignment operator.
| std::map<std::string, std::string> kcenon::network::events::network_metric_event::labels |
Additional labels/tags
Definition at line 61 of file network_metric_event.h.
| std::string kcenon::network::events::network_metric_event::name |
Metric name
Definition at line 56 of file network_metric_event.h.
| std::chrono::steady_clock::time_point kcenon::network::events::network_metric_event::timestamp |
Event timestamp
Definition at line 60 of file network_metric_event.h.
| network_metric_type kcenon::network::events::network_metric_event::type |
Metric type
Definition at line 59 of file network_metric_event.h.
| std::string kcenon::network::events::network_metric_event::unit |
Unit of measurement
Definition at line 58 of file network_metric_event.h.
| double kcenon::network::events::network_metric_event::value |
Metric value
Definition at line 57 of file network_metric_event.h.