From 58218a4cdd891bc9b15db074bc0f036dce95e75f Mon Sep 17 00:00:00 2001 From: lambdaliu Date: Wed, 29 Sep 2021 16:11:42 +0800 Subject: [PATCH] rename outlier detect to health check --- polaris.yaml.template | 2 +- polaris/engine/health_check_executor.h | 2 +- polaris/plugin/health_checker/health_checker.cpp | 2 +- polaris/plugin/health_checker/health_checker.h | 6 +++--- polaris/plugin/health_checker/http_detector.h | 6 +++--- polaris/plugin/health_checker/tcp_detector.h | 6 +++--- polaris/plugin/health_checker/udp_detector.h | 6 +++--- .../{outlier_detector => health_checker}/health_checker.cpp | 0 .../http_detector_test.cpp | 0 .../tcp_detector_test.cpp | 0 .../udp_detector_test.cpp | 0 11 files changed, 15 insertions(+), 15 deletions(-) rename test/plugin/{outlier_detector => health_checker}/health_checker.cpp (100%) rename test/plugin/{outlier_detector => health_checker}/http_detector_test.cpp (100%) rename test/plugin/{outlier_detector => health_checker}/tcp_detector_test.cpp (100%) rename test/plugin/{outlier_detector => health_checker}/udp_detector_test.cpp (100%) diff --git a/polaris.yaml.template b/polaris.yaml.template index 1c60bb5..bca0464 100644 --- a/polaris.yaml.template +++ b/polaris.yaml.template @@ -265,7 +265,7 @@ consumer: setCircuitBreaker: enable: false #描述:故障探测相关配置 - outlierDetection: + healthCheck: #描述:是否启用故障探测功能 #类型:bool #默认值:true diff --git a/polaris/engine/health_check_executor.h b/polaris/engine/health_check_executor.h index 76f6668..c587c2a 100644 --- a/polaris/engine/health_check_executor.h +++ b/polaris/engine/health_check_executor.h @@ -31,7 +31,7 @@ class HealthCheckExecutor : public Executor { virtual ~HealthCheckExecutor() {} // 获取线程名字 - virtual const char* GetName() { return "outlier_detect"; } + virtual const char* GetName() { return "health_check"; } virtual void SetupWork(); diff --git a/polaris/plugin/health_checker/health_checker.cpp b/polaris/plugin/health_checker/health_checker.cpp index 13738ed..6f4cf0c 100644 --- a/polaris/plugin/health_checker/health_checker.cpp +++ b/polaris/plugin/health_checker/health_checker.cpp @@ -108,7 +108,7 @@ ReturnCode HealthCheckerChainImpl::Init(Config* config, Context* context) { plugin_config = NULL; } else { POLARIS_LOG(LOG_ERROR, - "Outlier detector plugin with name[%s] not found, skip it for service[%s/%s]", + "health checker plugin with name[%s] not found, skip it for service[%s/%s]", plugin_name.c_str(), service_key_.namespace_.c_str(), service_key_.name_.c_str()); } } diff --git a/polaris/plugin/health_checker/health_checker.h b/polaris/plugin/health_checker/health_checker.h index 8223174..1954c8d 100644 --- a/polaris/plugin/health_checker/health_checker.h +++ b/polaris/plugin/health_checker/health_checker.h @@ -11,8 +11,8 @@ // language governing permissions and limitations under the License. // -#ifndef POLARIS_CPP_POLARIS_PLUGIN_OUTLIER_DETECTOR_OUTLIER_DETECTOR_H_ -#define POLARIS_CPP_POLARIS_PLUGIN_OUTLIER_DETECTOR_OUTLIER_DETECTOR_H_ +#ifndef POLARIS_CPP_POLARIS_PLUGIN_HEALTH_CHECKER_HEALTH_CHECKER_H_ +#define POLARIS_CPP_POLARIS_PLUGIN_HEALTH_CHECKER_HEALTH_CHECKER_H_ #include @@ -81,4 +81,4 @@ class HealthCheckerChainImpl : public HealthCheckerChain { } // namespace polaris -#endif // POLARIS_CPP_POLARIS_PLUGIN_OUTLIER_DETECTOR_OUTLIER_DETECTOR_H_ +#endif // POLARIS_CPP_POLARIS_PLUGIN_HEALTH_CHECKER_HEALTH_CHECKER_H_ diff --git a/polaris/plugin/health_checker/http_detector.h b/polaris/plugin/health_checker/http_detector.h index 0c6e35e..c1d517f 100644 --- a/polaris/plugin/health_checker/http_detector.h +++ b/polaris/plugin/health_checker/http_detector.h @@ -11,8 +11,8 @@ // language governing permissions and limitations under the License. // -#ifndef POLARIS_CPP_POLARIS_PLUGIN_OUTLIER_DETECTOR_HTTP_DETECTOR_H_ -#define POLARIS_CPP_POLARIS_PLUGIN_OUTLIER_DETECTOR_HTTP_DETECTOR_H_ +#ifndef POLARIS_CPP_POLARIS_PLUGIN_HEALTH_CHECKER_HTTP_DETECTOR_H_ +#define POLARIS_CPP_POLARIS_PLUGIN_HEALTH_CHECKER_HTTP_DETECTOR_H_ #include @@ -44,4 +44,4 @@ class HttpHealthChecker : public HealthChecker { } // namespace polaris -#endif // POLARIS_CPP_POLARIS_PLUGIN_OUTLIER_DETECTOR_HTTP_DETECTOR_H_ +#endif // POLARIS_CPP_POLARIS_PLUGIN_HEALTH_CHECKER_HTTP_DETECTOR_H_ diff --git a/polaris/plugin/health_checker/tcp_detector.h b/polaris/plugin/health_checker/tcp_detector.h index 7ce3905..68bb34d 100644 --- a/polaris/plugin/health_checker/tcp_detector.h +++ b/polaris/plugin/health_checker/tcp_detector.h @@ -11,8 +11,8 @@ // language governing permissions and limitations under the License. // -#ifndef POLARIS_CPP_POLARIS_PLUGIN_OUTLIER_DETECTOR_TCP_DETECTOR_H_ -#define POLARIS_CPP_POLARIS_PLUGIN_OUTLIER_DETECTOR_TCP_DETECTOR_H_ +#ifndef POLARIS_CPP_POLARIS_PLUGIN_HEALTH_CHECKER_TCP_DETECTOR_H_ +#define POLARIS_CPP_POLARIS_PLUGIN_HEALTH_CHECKER_TCP_DETECTOR_H_ #include @@ -45,4 +45,4 @@ class TcpHealthChecker : public HealthChecker { } // namespace polaris -#endif // POLARIS_CPP_POLARIS_PLUGIN_OUTLIER_DETECTOR_TCP_DETECTOR_H_ +#endif // POLARIS_CPP_POLARIS_PLUGIN_HEALTH_CHECKER_TCP_DETECTOR_H_ diff --git a/polaris/plugin/health_checker/udp_detector.h b/polaris/plugin/health_checker/udp_detector.h index 3a24b55..44f8746 100644 --- a/polaris/plugin/health_checker/udp_detector.h +++ b/polaris/plugin/health_checker/udp_detector.h @@ -11,8 +11,8 @@ // language governing permissions and limitations under the License. // -#ifndef POLARIS_CPP_POLARIS_PLUGIN_OUTLIER_DETECTOR_UDP_DETECTOR_H_ -#define POLARIS_CPP_POLARIS_PLUGIN_OUTLIER_DETECTOR_UDP_DETECTOR_H_ +#ifndef POLARIS_CPP_POLARIS_PLUGIN_HEALTH_CHECKER_UDP_DETECTOR_H_ +#define POLARIS_CPP_POLARIS_PLUGIN_HEALTH_CHECKER_UDP_DETECTOR_H_ #include @@ -45,4 +45,4 @@ class UdpHealthChecker : public HealthChecker { } // namespace polaris -#endif // POLARIS_CPP_POLARIS_PLUGIN_OUTLIER_DETECTOR_UDP_DETECTOR_H_ +#endif // POLARIS_CPP_POLARIS_PLUGIN_HEALTH_CHECKER_UDP_DETECTOR_H_ diff --git a/test/plugin/outlier_detector/health_checker.cpp b/test/plugin/health_checker/health_checker.cpp similarity index 100% rename from test/plugin/outlier_detector/health_checker.cpp rename to test/plugin/health_checker/health_checker.cpp diff --git a/test/plugin/outlier_detector/http_detector_test.cpp b/test/plugin/health_checker/http_detector_test.cpp similarity index 100% rename from test/plugin/outlier_detector/http_detector_test.cpp rename to test/plugin/health_checker/http_detector_test.cpp diff --git a/test/plugin/outlier_detector/tcp_detector_test.cpp b/test/plugin/health_checker/tcp_detector_test.cpp similarity index 100% rename from test/plugin/outlier_detector/tcp_detector_test.cpp rename to test/plugin/health_checker/tcp_detector_test.cpp diff --git a/test/plugin/outlier_detector/udp_detector_test.cpp b/test/plugin/health_checker/udp_detector_test.cpp similarity index 100% rename from test/plugin/outlier_detector/udp_detector_test.cpp rename to test/plugin/health_checker/udp_detector_test.cpp