Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
kcenon::monitoring::service_config Struct Reference

Service configuration for graceful degradation. More...

#include <graceful_degradation.h>

Collaboration diagram for kcenon::monitoring::service_config:
Collaboration graph

Public Member Functions

bool validate () const
 

Public Attributes

std::string name
 
service_priority priority = service_priority::normal
 
double error_rate_threshold = 0.5
 
std::chrono::milliseconds health_check_interval = std::chrono::milliseconds(5000)
 
bool auto_recover = true
 

Detailed Description

Service configuration for graceful degradation.

Definition at line 71 of file graceful_degradation.h.

Member Function Documentation

◆ validate()

bool kcenon::monitoring::service_config::validate ( ) const
inline

Definition at line 78 of file graceful_degradation.h.

78 {
79 if (name.empty()) {
80 return false;
81 }
83 return false;
84 }
85 return true;
86 }

References error_rate_threshold, and name.

Referenced by kcenon::monitoring::graceful_degradation_manager::register_service(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

Member Data Documentation

◆ auto_recover

bool kcenon::monitoring::service_config::auto_recover = true

Definition at line 76 of file graceful_degradation.h.

◆ error_rate_threshold

double kcenon::monitoring::service_config::error_rate_threshold = 0.5

Definition at line 74 of file graceful_degradation.h.

Referenced by TEST_F(), TEST_F(), and validate().

◆ health_check_interval

std::chrono::milliseconds kcenon::monitoring::service_config::health_check_interval = std::chrono::milliseconds(5000)

Definition at line 75 of file graceful_degradation.h.

◆ name

std::string kcenon::monitoring::service_config::name

◆ priority

service_priority kcenon::monitoring::service_config::priority = service_priority::normal

Definition at line 73 of file graceful_degradation.h.

Referenced by kcenon::monitoring::create_service_config().


The documentation for this struct was generated from the following file: