7#include <unordered_map>
9#include <userver/dynamic_config/snapshot.hpp>
10#include <userver/formats/json/value.hpp>
11#include <userver/yaml_config/yaml_config.hpp>
13USERVER_NAMESPACE_BEGIN
18std::chrono::milliseconds
19ParseMs(
const formats::
json::Value& value, std::optional<std::chrono::milliseconds> default_value = {});
22extern const std::string_view kDump;
23extern const std::string_view kMaxDumpAge;
24extern const std::string_view kMinDumpInterval;
26struct ConfigPatch
final {
27 std::optional<
bool> dumps_enabled;
28 std::optional<std::chrono::milliseconds> min_dump_interval;
37 uint64_t dump_format_version;
39 std::string dump_directory;
40 std::string fs_task_processor;
41 uint64_t max_dump_count;
42 std::optional<std::chrono::milliseconds> max_dump_age;
43 bool max_dump_age_set;
44 bool dump_is_encrypted;
46 bool static_dumps_enabled;
47 std::chrono::milliseconds static_min_dump_interval;
50struct DynamicConfig
final {
51 explicit DynamicConfig(
const Config& config, ConfigPatch&& patch);
53 bool operator==(
const DynamicConfig& other)
const noexcept;
54 bool operator!=(
const DynamicConfig& other)
const noexcept;
57 std::chrono::milliseconds min_dump_interval;
60extern const dynamic_config::Key<std::unordered_map<std::string, ConfigPatch>> kConfigSet;