userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
config.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/dump/config.hpp
4
/// @brief Dump storage configuration types
5
6
#
include
<
chrono
>
7
#
include
<
optional
>
8
#
include
<
string
>
9
#
include
<
string_view
>
10
#
include
<
unordered_map
>
11
12
#
include
<
userver
/
dynamic_config
/
snapshot
.
hpp
>
13
#
include
<
userver
/
formats
/
json
/
value
.
hpp
>
14
#
include
<
userver
/
yaml_config
/
yaml_config
.
hpp
>
15
16
#
include
<
dynamic_config
/
variables
/
USERVER_DUMPS
.
hpp
>
17
18
USERVER_NAMESPACE_BEGIN
19
20
namespace
dump
{
21
22
namespace
impl {
23
std::chrono::milliseconds ParseMs(
24
const
formats::
json
::
Value
& value,
25
std::optional<std::chrono::milliseconds> default_value = {}
26
);
27
}
28
29
extern
const
std::string_view kDump;
30
extern
const
std::string_view kMaxDumpAge;
31
extern
const
std::string_view kMinDumpInterval;
32
33
using
ConfigPatch = ::dynamic_config::userver_dumps::ConfigPatch;
34
35
struct
Config
final
{
36
Config(std::string name,
const
yaml_config::
YamlConfig
& config, std::string_view dump_root);
37
38
std::string name;
39
uint64_t dump_format_version;
40
bool
world_readable;
41
std::string dump_directory;
42
std::optional<std::string> fs_task_processor;
43
uint64_t max_dump_count;
44
std::optional<std::chrono::milliseconds> max_dump_age;
45
bool
max_dump_age_set;
46
bool
dump_is_encrypted;
47
48
bool
static_dumps_enabled;
49
std::chrono::milliseconds static_min_dump_interval;
50
};
51
52
struct
DynamicConfig
final
{
53
explicit
DynamicConfig(
const
Config& config, ConfigPatch&& patch);
54
55
bool
operator==(
const
DynamicConfig& other)
const
noexcept
;
56
57
bool
dumps_enabled;
58
std::chrono::milliseconds min_dump_interval;
59
};
60
61
}
// namespace dump
62
63
USERVER_NAMESPACE_END
userver
dump
config.hpp
Generated on
for userver by
Doxygen
1.17.0