userver
C++ Async Framework
Toggle main menu visibility
Documentation
API Groups
Namespaces
Reference
Class List
Class Index
File List
Macros
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
qos.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/ugrpc/client/qos.hpp
4
/// @brief @copybrief ugrpc::client::Qos
5
6
#
include
<
chrono
>
7
#
include
<
optional
>
8
9
#
include
<
userver
/
formats
/
json_fwd
.
hpp
>
10
11
USERVER_NAMESPACE_BEGIN
12
13
namespace
ugrpc::client {
14
15
/// @brief Per-RPC quality-of-service config. Taken from
16
/// @ref ugrpc::client::ClientQos. Can also be passed to ugrpc client methods
17
/// manually.
18
struct
Qos
final
{
19
/// @brief The maximum number of RPC attempts, including the original attempt.
20
/// If set must be minimum 1.
21
/// If `std::nullopt`, default grpc++ retry configuration is used.
22
///
23
/// See also [the official gRPC docs on retries](https://grpc.io/docs/guides/retry/).
24
std::optional<
int
>
attempts
;
25
26
/// @brief An upper bound on the deadline applied to the entire RPC.
27
/// If `std::nullopt`, no static deadline is applied, which is reasonable
28
/// for streaming RPCs.
29
///
30
/// @ref scripts/docs/en/userver/deadline_propagation.md "Deadline propagation",
31
/// when enabled, also puts an upper bound on the RPC deadline.
32
///
33
/// @note The problem of "dead servers" is typically solved using
34
/// [keepalive pings](https://github.com/grpc/grpc/blob/master/doc/keepalive.md),
35
/// not using timeouts.
36
std::optional<std::chrono::milliseconds>
timeout
;
37
};
18
struct
Qos
final
{
…
};
38
39
bool
operator==(
const
Qos& lhs,
const
Qos& rhs)
noexcept
;
40
41
Qos Parse(
const
formats
::
json
::Value& value,
formats
::
parse
::
To
<Qos>);
42
43
formats
::
json
::Value Serialize(
const
Qos& qos,
formats
::
serialize
::
To
<
formats
::
json
::Value>);
44
45
std::optional<std::uint32_t> GetAttempts(
const
Qos& qos);
46
47
std::optional<std::chrono::milliseconds> GetTotalTimeout(
const
Qos& qos);
48
49
}
// namespace ugrpc::client
50
51
USERVER_NAMESPACE_END
userver
ugrpc
client
qos.hpp
Generated on Wed Apr 30 2025 15:56:15 for userver by
Doxygen
1.13.2