26#ifndef MYSQL_HARNESS_DYNAMIC_CONFIG_INCLUDED
27#define MYSQL_HARNESS_DYNAMIC_CONFIG_INCLUDED
33#ifdef RAPIDJSON_NO_SIZETYPEDEFINE
37#include <rapidjson/document.h>
39#include "harness_export.h"
53 std::variant<std::monostate, int64_t, bool, double, std::string>;
62 using SectionId = std::pair<std::string, std::string>;
76 void set_option_configured(
const SectionId §ion_id,
77 std::string_view option_name,
90 void set_option_default(
const SectionId §ion_id,
91 std::string_view option_name,
105 void set_option_default(
const SectionId §ion_id,
106 std::string_view option_name,
136 std::string get_json_as_string(
const ValueType
value_type)
const;
155 std::string_view option_name,
const OptionValue &value);
160 using Config = std::map<SectionId, SectionConfig>;
Respresents the current Router configuration.
Definition: dynamic_config.h:48
std::variant< std::monostate, int64_t, bool, double, std::string > OptionValue
Definition: dynamic_config.h:53
DynamicConfig(const DynamicConfig &)=delete
std::pair< std::string, std::string > SectionId
Definition: dynamic_config.h:62
rapidjson::CrtAllocator JsonAllocator
Definition: dynamic_config.h:65
std::string OptionName
Definition: dynamic_config.h:50
std::map< SectionId, SectionConfig > Config
Definition: dynamic_config.h:160
Config defaults_clusterset_
Definition: dynamic_config.h:170
std::map< OptionName, OptionValue > SectionOptions
Definition: dynamic_config.h:63
DynamicConfig & operator=(const DynamicConfig &)=delete
Config configured_
Definition: dynamic_config.h:166
rapidjson::GenericDocument< rapidjson::UTF8<>, JsonAllocator > JsonDocument
Definition: dynamic_config.h:67
Config defaults_cluster_
Definition: dynamic_config.h:168
ValueType
Type of the options stored in the dynamic configuration object.
Definition: dynamic_config.h:112
rapidjson::GenericDocument< rapidjson::UTF8<>, JsonAllocator > JsonDocument
Definition: dynamic_config.cc:46
Define rapidjson::SizeType to be std::size_t.
uint16_t value_type
Definition: vt100.h:184
static mysql_service_status_t clear(reference_caching_channel channel) noexcept
Definition: component.cc:146
Definition: dynamic_config.h:157
SectionOptions options
Definition: dynamic_config.h:158