Line data Source code
1 : #include "source/extensions/health_checkers/redis/config.h" 2 : 3 : #include "envoy/config/core/v3/health_check.pb.h" 4 : #include "envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.h" 5 : #include "envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.validate.h" 6 : #include "envoy/registry/registry.h" 7 : 8 : #include "source/common/config/utility.h" 9 : #include "source/extensions/health_checkers/redis/utility.h" 10 : 11 : namespace Envoy { 12 : namespace Extensions { 13 : namespace HealthCheckers { 14 : namespace RedisHealthChecker { 15 : 16 : Upstream::HealthCheckerSharedPtr RedisHealthCheckerFactory::createCustomHealthChecker( 17 : const envoy::config::core::v3::HealthCheck& config, 18 0 : Server::Configuration::HealthCheckerFactoryContext& context) { 19 0 : return std::make_shared<RedisHealthChecker>( 20 0 : context.cluster(), config, 21 0 : getRedisHealthCheckConfig(config, context.messageValidationVisitor()), 22 0 : context.mainThreadDispatcher(), context.runtime(), context.eventLogger(), context.api(), 23 0 : NetworkFilters::Common::Redis::Client::ClientFactoryImpl::instance_); 24 0 : }; 25 : 26 : /** 27 : * Static registration for the redis custom health checker. @see RegisterFactory. 28 : */ 29 : REGISTER_FACTORY(RedisHealthCheckerFactory, Server::Configuration::CustomHealthCheckerFactory); 30 : 31 : } // namespace RedisHealthChecker 32 : } // namespace HealthCheckers 33 : } // namespace Extensions 34 : } // namespace Envoy