Line data Source code
1 : #pragma once 2 : 3 : #include "envoy/extensions/upstreams/http/udp/v3/udp_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 Udp { 12 : 13 : /** 14 : * Config registration for the UdpConnPool. @see Router::GenericConnPoolFactory 15 : */ 16 : class UdpGenericConnPoolFactory : public Router::GenericConnPoolFactory { 17 : public: 18 38 : std::string name() const override { return "envoy.filters.connection_pools.http.udp"; } 19 2 : std::string category() const override { return "envoy.upstreams"; } 20 : Router::GenericConnPoolPtr 21 : createGenericConnPool(Upstream::ThreadLocalCluster& thread_local_cluster, 22 : Router::GenericConnPoolFactory::UpstreamProtocol upstream_protocol, 23 : Upstream::ResourcePriority priority, 24 : absl::optional<Envoy::Http::Protocol> downstream_protocol, 25 : Upstream::LoadBalancerContext* ctx) const override; 26 1 : ProtobufTypes::MessagePtr createEmptyConfigProto() override { 27 1 : return std::make_unique<envoy::extensions::upstreams::http::udp::v3::UdpConnectionPoolProto>(); 28 1 : } 29 : }; 30 : 31 : DECLARE_FACTORY(UdpGenericConnPoolFactory); 32 : 33 : } // namespace Udp 34 : } // namespace Http 35 : } // namespace Upstreams 36 : } // namespace Extensions 37 : } // namespace Envoy