userver
C++ Async Framework
Loading...
Searching...
No Matches
settings.hpp
1
#
pragma
once
2
3
#
include
<
chrono
>
4
#
include
<
cstdint
>
5
#
include
<
optional
>
6
#
include
<
string_view
>
7
8
#
include
<
ydb
-
cpp
-
sdk
/
client
/
table
/
query_stats
/
stats
.
h
>
9
10
#
include
<
userver
/
yaml_config
/
fwd
.
hpp
>
11
12
USERVER_NAMESPACE_BEGIN
13
14
namespace
ydb {
15
16
enum
class
TransactionMode { kSerializableRW, kOnlineRO, kStaleRO, kSnapshotRO, kSnapshotRW };
17
18
struct
OperationSettings
final
{
19
std::optional<std::uint32_t> retries{std::nullopt};
20
21
// https://docs.yandex-team.ru/ydb-tech/best_practices/timeouts#operational
22
std::chrono::milliseconds client_timeout_ms{0};
23
std::optional<TransactionMode> tx_mode{std::nullopt};
24
std::chrono::milliseconds get_session_timeout_ms{0};
25
26
std::string trace_id{};
27
};
28
29
struct
QuerySettings
final
{
30
// deprecated, Query Client doesn't have KeepInQueryCache, it caches automatically
31
std::optional<
bool
> keep_in_query_cache{std::nullopt};
32
33
std::optional<NYdb::NTable::ECollectQueryStatsMode> collect_query_stats{std::nullopt};
34
};
35
36
}
// namespace ydb
37
38
namespace
formats::
parse
{
39
40
ydb::OperationSettings Parse(
const
yaml_config::
YamlConfig
& config, To<ydb::OperationSettings>);
41
42
}
// namespace formats::parse
43
44
USERVER_NAMESPACE_END
userver
ydb
settings.hpp
Generated on Wed Apr 1 2026 10:46:41 for userver by
Doxygen
1.13.2