LCOV - code coverage report
Current view: top level - envoy/upstream - health_check_event_sink.h (source / functions) Hit Total Coverage
Test: coverage.dat Lines: 1 3 33.3 %
Date: 2024-01-05 06:35:25 Functions: 1 3 33.3 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "envoy/config/typed_config.h"
       4             : #include "envoy/server/health_checker_config.h"
       5             : 
       6             : namespace Envoy {
       7             : namespace Upstream {
       8             : 
       9             : /**
      10             :  * Sink for health check event.
      11             :  */
      12             : class HealthCheckEventSink {
      13             : public:
      14           0 :   virtual ~HealthCheckEventSink() = default;
      15             : 
      16             :   virtual void log(envoy::data::core::v3::HealthCheckEvent event) PURE;
      17             : };
      18             : 
      19             : using HealthCheckEventSinkPtr = std::unique_ptr<HealthCheckEventSink>;
      20             : using HealthCheckEventSinkSharedPtr = std::shared_ptr<HealthCheckEventSink>;
      21             : 
      22             : /**
      23             :  * A factory abstract class for creating instances of HealthCheckEventSink.
      24             :  */
      25             : class HealthCheckEventSinkFactory : public Config::TypedFactory {
      26             : public:
      27           0 :   ~HealthCheckEventSinkFactory() override = default;
      28             : 
      29             :   /**
      30             :    * Creates an HealthCheckEventSink using the given config.
      31             :    */
      32             :   virtual HealthCheckEventSinkPtr
      33             :   createHealthCheckEventSink(const ProtobufWkt::Any& config,
      34             :                              Server::Configuration::HealthCheckerFactoryContext& context) PURE;
      35             : 
      36           4 :   std::string category() const override { return "envoy.health_check.event_sinks"; }
      37             : };
      38             : 
      39             : } // namespace Upstream
      40             : } // namespace Envoy

Generated by: LCOV version 1.15