Line data Source code
1 : #pragma once 2 : 3 : #include "envoy/config/core/v3/health_check.pb.h" 4 : #include "envoy/extensions/health_checkers/thrift/v3/thrift.pb.h" 5 : #include "envoy/extensions/health_checkers/thrift/v3/thrift.pb.validate.h" 6 : #include "envoy/server/health_checker_config.h" 7 : 8 : #include "source/extensions/health_checkers/thrift/thrift.h" 9 : 10 : namespace Envoy { 11 : namespace Extensions { 12 : namespace HealthCheckers { 13 : namespace ThriftHealthChecker { 14 : 15 : /** 16 : * Config registration for the thrift health checker. 17 : */ 18 : class ThriftHealthCheckerFactory : public Server::Configuration::CustomHealthCheckerFactory { 19 : public: 20 : Upstream::HealthCheckerSharedPtr 21 : createCustomHealthChecker(const envoy::config::core::v3::HealthCheck& config, 22 : Server::Configuration::HealthCheckerFactoryContext& context) override; 23 : 24 38 : std::string name() const override { return "envoy.health_checkers.thrift"; } 25 1 : ProtobufTypes::MessagePtr createEmptyConfigProto() override { 26 1 : return ProtobufTypes::MessagePtr{new envoy::extensions::health_checkers::thrift::v3::Thrift()}; 27 1 : } 28 : }; 29 : 30 : DECLARE_FACTORY(ThriftHealthCheckerFactory); 31 : 32 : } // namespace ThriftHealthChecker 33 : } // namespace HealthCheckers 34 : } // namespace Extensions 35 : } // namespace Envoy