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>
13#include <dynamic_config/variables/USERVER_DUMPS.hpp>
15USERVER_NAMESPACE_BEGIN
20std::chrono::milliseconds
21ParseMs(
const formats::json::Value& value, std::optional<std::chrono::milliseconds> default_value = {});
24extern const std::string_view kDump;
25extern const std::string_view kMaxDumpAge;
26extern const std::string_view kMinDumpInterval;
28using ConfigPatch = ::dynamic_config::userver_dumps::ConfigPatch;
31 Config(std::string name,
const yaml_config::YamlConfig& config, std::string_view dump_root);
34 uint64_t dump_format_version;
36 std::string dump_directory;
37 std::optional<std::string> fs_task_processor;
38 uint64_t max_dump_count;
39 std::optional<std::chrono::milliseconds> max_dump_age;
40 bool max_dump_age_set;
41 bool dump_is_encrypted;
43 bool static_dumps_enabled;
44 std::chrono::milliseconds static_min_dump_interval;
47struct DynamicConfig
final {
48 explicit DynamicConfig(
const Config& config, ConfigPatch&& patch);
50 bool operator==(
const DynamicConfig& other)
const noexcept;
51 bool operator!=(
const DynamicConfig& other)
const noexcept;
54 std::chrono::milliseconds min_dump_interval;