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