/proc/self/cwd/source/extensions/filters/network/tcp_proxy/config.cc
Line | Count | Source (jump to first uncovered line) |
1 | | #include "source/extensions/filters/network/tcp_proxy/config.h" |
2 | | |
3 | | #include "envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.pb.h" |
4 | | #include "envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.pb.validate.h" |
5 | | #include "envoy/registry/registry.h" |
6 | | |
7 | | #include "source/common/tcp_proxy/tcp_proxy.h" |
8 | | |
9 | | namespace Envoy { |
10 | | namespace Extensions { |
11 | | namespace NetworkFilters { |
12 | | namespace TcpProxy { |
13 | | |
14 | | Network::FilterFactoryCb ConfigFactory::createFilterFactoryFromProtoTyped( |
15 | | const envoy::extensions::filters::network::tcp_proxy::v3::TcpProxy& proto_config, |
16 | 0 | Server::Configuration::FactoryContext& context) { |
17 | 0 | ASSERT(!proto_config.stat_prefix().empty()); |
18 | | |
19 | 0 | Envoy::TcpProxy::ConfigSharedPtr filter_config( |
20 | 0 | std::make_shared<Envoy::TcpProxy::Config>(proto_config, context)); |
21 | 0 | return [filter_config, &context](Network::FilterManager& filter_manager) -> void { |
22 | 0 | filter_manager.addReadFilter( |
23 | 0 | std::make_shared<Envoy::TcpProxy::Filter>(filter_config, context.clusterManager())); |
24 | 0 | }; |
25 | 0 | } |
26 | | |
27 | | /** |
28 | | * Static registration for the tcp_proxy filter. @see RegisterFactory. |
29 | | */ |
30 | | LEGACY_REGISTER_FACTORY(ConfigFactory, Server::Configuration::NamedNetworkFilterConfigFactory, |
31 | | "envoy.tcp_proxy"); |
32 | | |
33 | | } // namespace TcpProxy |
34 | | } // namespace NetworkFilters |
35 | | } // namespace Extensions |
36 | | } // namespace Envoy |