1
#pragma once
2

            
3
#include "envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.h"
4
#include "envoy/registry/registry.h"
5
#include "envoy/router/router.h"
6

            
7
namespace Envoy {
8
namespace Extensions {
9
namespace Upstreams {
10
namespace Http {
11
namespace Generic {
12

            
13
/**
14
 * Config registration for the GenericConnPool. * @see Router::GenericConnPoolFactory
15
 */
16
class GenericGenericConnPoolFactory : public Router::GenericConnPoolFactory {
17
public:
18
10998
  std::string name() const override { return "envoy.filters.connection_pools.http.generic"; }
19
1012
  std::string category() const override { return "envoy.upstreams"; }
20
  Router::GenericConnPoolPtr createGenericConnPool(
21
      Upstream::HostConstSharedPtr host, Upstream::ThreadLocalCluster& thread_local_cluster,
22
      Router::GenericConnPoolFactory::UpstreamProtocol upstream_protocol,
23
      Upstream::ResourcePriority priority,
24
      absl::optional<Envoy::Http::Protocol> downstream_protocol, Upstream::LoadBalancerContext* ctx,
25
      const Protobuf::Message&) const override;
26

            
27
47492
  ProtobufTypes::MessagePtr createEmptyConfigProto() override {
28
47492
    return std::make_unique<
29
47492
        envoy::extensions::upstreams::http::generic::v3::GenericConnectionPoolProto>();
30
47492
  }
31
};
32

            
33
DECLARE_FACTORY(GenericGenericConnPoolFactory);
34

            
35
} // namespace Generic
36
} // namespace Http
37
} // namespace Upstreams
38
} // namespace Extensions
39
} // namespace Envoy