/proc/self/cwd/source/extensions/upstreams/tcp/config.cc
Line | Count | Source (jump to first uncovered line) |
1 | | #include "source/extensions/upstreams/tcp/config.h" |
2 | | |
3 | | #include <chrono> |
4 | | #include <memory> |
5 | | |
6 | | #include "envoy/upstream/upstream.h" |
7 | | |
8 | | #include "source/common/config/utility.h" |
9 | | #include "source/common/protobuf/utility.h" |
10 | | |
11 | | namespace Envoy { |
12 | | namespace Extensions { |
13 | | namespace Upstreams { |
14 | | namespace Tcp { |
15 | | |
16 | | ProtocolOptionsConfigImpl::ProtocolOptionsConfigImpl( |
17 | 0 | const envoy::extensions::upstreams::tcp::v3::TcpProtocolOptions& options) { |
18 | 0 | if (options.has_idle_timeout()) { |
19 | 0 | idle_timeout_ = |
20 | 0 | std::chrono::milliseconds(DurationUtil::durationToMilliseconds(options.idle_timeout())); |
21 | 0 | } |
22 | 0 | } |
23 | | |
24 | | LEGACY_REGISTER_FACTORY(ProtocolOptionsConfigFactory, Server::Configuration::ProtocolOptionsFactory, |
25 | | "envoy.upstreams.tcp.tcp_protocol_options"); |
26 | | } // namespace Tcp |
27 | | } // namespace Upstreams |
28 | | } // namespace Extensions |
29 | | } // namespace Envoy |