userver: userver/testsuite/grpc_control.hpp Source File
Loading...
Searching...
No Matches
grpc_control.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/testsuite/grpc_control.hpp
4/// @brief @copybrief testsuite::GrpcControl
5
6#include <chrono>
7
8#include <userver/engine/deadline.hpp>
9
10USERVER_NAMESPACE_BEGIN
11
12namespace testsuite {
13
14/// @brief Testsuite overrides for gRPC client timeouts and TLS
16public:
17 GrpcControl() = default;
18
19 GrpcControl(std::chrono::milliseconds timeout, bool is_tls_enabled);
20
21 std::chrono::milliseconds MakeTimeout(std::chrono::milliseconds duration) const;
22
23 bool IsTlsEnabled() const;
24
25private:
26 std::chrono::milliseconds timeout_{};
27 bool is_tls_enabled_{false};
28};
29
30} // namespace testsuite
31
32USERVER_NAMESPACE_END