|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Example demonstrating health monitoring and reliability features. More...
#include <iostream>#include <thread>#include <random>#include <atomic>#include "kcenon/monitoring/health/health_monitor.h"#include "kcenon/monitoring/reliability/circuit_breaker.h"#include "kcenon/monitoring/reliability/fault_tolerance_manager.h"#include "kcenon/monitoring/reliability/retry_policy.h"#include "kcenon/monitoring/reliability/error_boundary.h"#include "kcenon/monitoring/core/result_types.h"#include "kcenon/monitoring/core/error_codes.h"
Go to the source code of this file.
Classes | |
| class | DatabaseConnection |
| class | ExternalApiClient |
Functions | |
| void | demonstrate_health_monitoring () |
| void | demonstrate_circuit_breaker () |
| void | demonstrate_retry_policy () |
| void | demonstrate_error_boundaries () |
| int | main () |
Example demonstrating health monitoring and reliability features.
Definition in file health_reliability_example.cpp.
| void demonstrate_circuit_breaker | ( | ) |
Definition at line 244 of file health_reliability_example.cpp.
References kcenon::monitoring::execute_with_circuit_breaker(), and kcenon::monitoring::fallback.
Referenced by main().


| void demonstrate_error_boundaries | ( | ) |
Definition at line 391 of file health_reliability_example.cpp.
References kcenon::monitoring::error_boundary_config::enable_fallback_logging, kcenon::monitoring::error, kcenon::monitoring::error_boundary_config::error_threshold, kcenon::monitoring::error_boundary_config::error_window, kcenon::monitoring::error_boundary< T >::execute(), kcenon::monitoring::error_boundary< T >::get_metrics(), kcenon::monitoring::error_boundary< T >::set_error_handler(), kcenon::monitoring::error_info::to_common_error(), and kcenon::monitoring::error_boundary_metrics::total_operations.
Referenced by main().


| void demonstrate_health_monitoring | ( | ) |
Definition at line 103 of file health_reliability_example.cpp.
References kcenon::monitoring::health_monitor_config::cache_duration, kcenon::monitoring::health_monitor::check_all(), kcenon::monitoring::health_monitor_config::check_interval, kcenon::monitoring::health_check_result::degraded(), kcenon::monitoring::health_monitor::get_health_report(), kcenon::monitoring::health_monitor::get_overall_status(), kcenon::monitoring::health_check_result::healthy(), kcenon::monitoring::health_monitor::refresh(), kcenon::monitoring::health_monitor::register_check(), kcenon::monitoring::health_monitor::register_recovery_handler(), kcenon::monitoring::health_monitor::start(), kcenon::monitoring::health_monitor::stop(), and kcenon::monitoring::health_check_result::unhealthy().
Referenced by main().


| void demonstrate_retry_policy | ( | ) |
Definition at line 335 of file health_reliability_example.cpp.
References kcenon::monitoring::retry_config::backoff_multiplier, kcenon::monitoring::delay, kcenon::monitoring::retry_config::initial_delay, kcenon::monitoring::retry_config::max_attempts, kcenon::monitoring::retry_config::max_delay, and kcenon::monitoring::retry_config::strategy.
Referenced by main().

| int main | ( | ) |
Definition at line 448 of file health_reliability_example.cpp.
References demonstrate_circuit_breaker(), demonstrate_error_boundaries(), demonstrate_health_monitoring(), and demonstrate_retry_policy().
