HttpHealthCheckerImpl::HttpHealthCheckerImpl(const Cluster& cluster,
                                             const envoy::config::core::v3::HealthCheck& config,
                                             Event::Dispatcher& dispatcher,
                                             Runtime::Loader& runtime,
                                             Random::RandomGenerator& random,
                                             HealthCheckEventLoggerPtr&& event_logger)
    : HealthCheckerImplBase(cluster, config, dispatcher, runtime, random, std::move(event_logger)),
      path_(config.http_health_check().path()), host_value_(config.http_health_check().host()),
      request_headers_parser_(
          Router::HeaderParser::configure(config.http_health_check().request_headers_to_add(),
                                          config.http_health_check().request_headers_to_remove())),
      http_status_checker_(config.http_health_check().expected_statuses(),
                           config.http_health_check().retriable_statuses(),
                           static_cast<uint64_t>(Http::Code::OK)),
      codec_client_type_(codecClientType(config.http_health_check().codec_client_type())),
      random_generator_(random) {
  if (config.http_health_check().has_service_name_matcher()) {
    service_name_matcher_.emplace(config.http_health_check().service_name_matcher());
  }
}
HttpHealthCheckerImpl::HttpHealthCheckerImpl(const Cluster& cluster,
                                             const envoy::config::core::v3::HealthCheck& config,
                                             Event::Dispatcher& dispatcher,
                                             Runtime::Loader& runtime,
                                             Random::RandomGenerator& random,
                                             HealthCheckEventLoggerPtr&& event_logger)
    : HealthCheckerImplBase(cluster, config, dispatcher, runtime, random, std::move(event_logger)),
      path_(config.http_health_check().path()), host_value_(config.http_health_check().host()),
      request_headers_parser_(
          Router::HeaderParser::configure(config.http_health_check().request_headers_to_add(),
                                          config.http_health_check().request_headers_to_remove())),
      http_status_checker_(config.http_health_check().expected_statuses(),
                           config.http_health_check().retriable_statuses(),
                           static_cast<uint64_t>(Http::Code::OK)),
      codec_client_type_(codecClientType(config.http_health_check().codec_client_type())),
      random_generator_(random) {
  if (config.http_health_check().has_service_name_matcher()) {
    service_name_matcher_.emplace(config.http_health_check().service_name_matcher());
  }
}