userver: userver/ugrpc/client/qos.hpp Source File
Loading...
Searching...
No Matches
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