26#ifndef MYSQL_HARNESS_DYNAMIC_STATE_INCLUDED
27#define MYSQL_HARNESS_DYNAMIC_STATE_INCLUDED
40#include "harness_export.h"
42#ifdef RAPIDJSON_NO_SIZETYPEDEFINE
46#include <rapidjson/document.h>
101 bool save(
bool is_clusterset,
bool pretty =
true);
117 bool save_to_stream(std::ostream &output_stream,
bool is_clusterset,
128 std::unique_ptr<JsonValue> get_section(
const std::string §ion_name);
140 bool update_section(
const std::string §ion_name,
JsonValue &&value);
143 bool load_from_stream(std::istream &input_stream);
146 void ensure_valid_against_schema();
148 void ensure_version_compatibility();
150 std::ifstream open_for_read();
151 std::ofstream open_for_write();
DynamicState represents a MySQLRouter dynamic state object.
Definition: dynamic_state.h:64
std::string file_name_
Definition: dynamic_state.h:155
~DynamicState()
Destructor.
std::unique_ptr< Pimpl > pimpl_
Definition: dynamic_state.h:153
static enum_log_json_pretty_print pretty
Definition: log_sink_json.cc:90
Define rapidjson::SizeType to be std::uint64_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:308
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:94
rapidjson::CrtAllocator JsonAllocator
Definition: dynamic_state.h:52
rapidjson::GenericValue< rapidjson::UTF8<>, JsonAllocator > JsonValue
Definition: dynamic_state.h:53
Definition: dynamic_state.cc:82