userver: userver/ugrpc/client/qos.hpp Source File
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
qos.hpp
1#pragma once
2
3#include <chrono>
4#include <optional>
5#include <string>
6#include <unordered_map>
7
8#include <grpcpp/client_context.h>
9
10#include <userver/formats/json_fwd.hpp>
11
12USERVER_NAMESPACE_BEGIN
13
14namespace testsuite {
15class GrpcControl;
16}
17
18namespace ugrpc::client {
19
20struct Qos final {
21 std::optional<std::chrono::milliseconds> timeout;
22};
23
24Qos Parse(const formats::json::Value& value, formats::parse::To<Qos>);
25
26formats::json::Value Serialize(const Qos& qos,
27 formats::serialize::To<formats::json::Value>);
28
29void ApplyQos(grpc::ClientContext& context, const Qos& qos,
30 const testsuite::GrpcControl& testsuite_control);
31
32} // namespace ugrpc::client
33
34USERVER_NAMESPACE_END