|
Clio
develop
The XRP Ledger API server.
|
Manages Prometheus metrics for cluster communication and node tracking. More...
#include <Metrics.hpp>
Public Member Functions | |
| Metrics () | |
| Constructs a Metrics instance and initializes metrics. | |
| void | onNewState (ClioNode::CUuid uuid, std::shared_ptr< Backend::ClusterData const > clusterData) |
| Updates metrics based on new cluster state. | |
Manages Prometheus metrics for cluster communication and node tracking.
This class tracks cluster-related metrics including:
| cluster::Metrics::Metrics | ( | ) |
Constructs a Metrics instance and initializes metrics.
Sets the initial node count to 1 (self) and marks communication as healthy.
| void cluster::Metrics::onNewState | ( | ClioNode::CUuid | uuid, |
| std::shared_ptr< Backend::ClusterData const > | clusterData ) |
Updates metrics based on new cluster state.
This callback is invoked when cluster state changes. It updates:
| uuid | The UUID of the node (unused in current implementation) |
| clusterData | Shared pointer to the current cluster data; may be empty if communication failed |