25#ifndef MYSQL_HARNESS_DYNAMIC_STATE_INCLUDED
26#define MYSQL_HARNESS_DYNAMIC_STATE_INCLUDED
39#include "harness_export.h"
41#ifdef RAPIDJSON_NO_SIZETYPEDEFINE
45#include <rapidjson/document.h>
100 bool save(
bool is_clusterset,
bool pretty =
true);
116 bool save_to_stream(std::ostream &output_stream,
bool is_clusterset,
127 std::unique_ptr<JsonValue> get_section(
const std::string §ion_name);
139 bool update_section(
const std::string §ion_name,
JsonValue &&value);
142 bool load_from_stream(std::istream &input_stream);
145 void ensure_valid_against_schema();
147 void ensure_version_compatibility();
149 std::ifstream open_for_read();
150 std::ofstream open_for_write();
DynamicState represents a MySQLRouter dynamic state object.
Definition: dynamic_state.h:63
std::string file_name_
Definition: dynamic_state.h:154
~DynamicState()
Destructor.
std::unique_ptr< Pimpl > pimpl_
Definition: dynamic_state.h:152
static enum_log_json_pretty_print pretty
Definition: log_sink_json.cc:89
Define rapidjson::SizeType to be std::size_t.
bool load(THD *, const dd::String_type &fname, dd::String_type *buf)
Read an sdi file from disk and store in a buffer.
Definition: sdi_file.cc:307
std::string file_name(Log_file_id file_id)
Provides name of the log file with the given file id, e.g.
Definition: log0pre_8_0_30.cc:93
rapidjson::CrtAllocator JsonAllocator
Definition: dynamic_state.h:51
rapidjson::GenericValue< rapidjson::UTF8<>, JsonAllocator > JsonValue
Definition: dynamic_state.h:52
Definition: dynamic_state.cc:81