LCOV - code coverage report
Current view: top level - source/extensions/upstreams/tcp/generic - config.h (source / functions) Hit Total Coverage
Test: coverage.dat Lines: 2 6 33.3 %
Date: 2024-01-05 06:35:25 Functions: 2 3 66.7 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.h"
       4             : #include "envoy/registry/registry.h"
       5             : #include "envoy/tcp/upstream.h"
       6             : 
       7             : namespace Envoy {
       8             : namespace Extensions {
       9             : namespace Upstreams {
      10             : namespace Tcp {
      11             : namespace Generic {
      12             : 
      13             : /**
      14             :  * Config registration for the GenericConnPool. * @see TcpProxy::GenericConnPoolFactory
      15             :  */
      16             : class GenericConnPoolFactory : public TcpProxy::GenericConnPoolFactory {
      17             : public:
      18           2 :   std::string name() const override { return "envoy.filters.connection_pools.tcp.generic"; }
      19           2 :   std::string category() const override { return "envoy.upstreams"; }
      20             :   TcpProxy::GenericConnPoolPtr
      21             :   createGenericConnPool(Upstream::ThreadLocalCluster& thread_local_cluster,
      22             :                         TcpProxy::TunnelingConfigHelperOptConstRef config,
      23             :                         Upstream::LoadBalancerContext* context,
      24             :                         Envoy::Tcp::ConnectionPool::UpstreamCallbacks& upstream_callbacks,
      25             :                         StreamInfo::StreamInfo& downstream_info) const override;
      26             : 
      27           0 :   ProtobufTypes::MessagePtr createEmptyConfigProto() override {
      28           0 :     return std::make_unique<
      29           0 :         envoy::extensions::upstreams::tcp::generic::v3::GenericConnectionPoolProto>();
      30           0 :   }
      31             : 
      32             : private:
      33             :   bool disableTunnelingByFilterState(StreamInfo::StreamInfo& downstream_info) const;
      34             : };
      35             : 
      36             : DECLARE_FACTORY(GenericConnPoolFactory);
      37             : 
      38             : } // namespace Generic
      39             : } // namespace Tcp
      40             : } // namespace Upstreams
      41             : } // namespace Extensions
      42             : } // namespace Envoy

Generated by: LCOV version 1.15