MySQL  8.0.22
Source Code Documentation
rest_mock_server.cc File Reference
#include <array>
#include <atomic>
#include <chrono>
#include <string>
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
#include <rapidjson/writer.h>
#include "mysql/harness/config_parser.h"
#include "mysql/harness/logging/logging.h"
#include "mysql/harness/plugin.h"
#include "mysqlrouter/plugin_config.h"
#include "mysqlrouter/http_server_component.h"
#include "mysqlrouter/mock_server_component.h"

Classes

class  RestApiV1MockServerGlobals
 
class  RestApiV1MockServerConnections
 

Macros

#define DLLEXPORT
 

Typedefs

using JsonDocument = rapidjson::GenericDocument< rapidjson::UTF8<>, rapidjson::CrtAllocator >
 
using JsonValue = rapidjson::GenericValue< rapidjson::UTF8<>, rapidjson::CrtAllocator >
 

Functions

static void init (mysql_harness::PluginFuncEnv *env)
 
static void start (mysql_harness::PluginFuncEnv *env)
 
static void stop (mysql_harness::PluginFuncEnv *)
 

Variables

static constexpr const char kSectionName [] {"rest_mock_server"}
 
static constexpr const char kRestGlobalsUri [] {"^/api/v1/mock_server/globals/$"}
 
static constexpr const char kRestConnectionsUri []
 
static const std::array< const char *, 2 > plugin_requires
 
mysql_harness::Plugin DLLEXPORT harness_plugin_rest_mock_server
 

Macro Definition Documentation

◆ DLLEXPORT

#define DLLEXPORT

Typedef Documentation

◆ JsonDocument

using JsonDocument = rapidjson::GenericDocument<rapidjson::UTF8<>, rapidjson::CrtAllocator>

◆ JsonValue

using JsonValue = rapidjson::GenericValue<rapidjson::UTF8<>, rapidjson::CrtAllocator>

Function Documentation

◆ init()

static void init ( mysql_harness::PluginFuncEnv env)
static

◆ start()

static void start ( mysql_harness::PluginFuncEnv env)
static

◆ stop()

static void stop ( mysql_harness::PluginFuncEnv )
static

Variable Documentation

◆ harness_plugin_rest_mock_server

mysql_harness::Plugin DLLEXPORT harness_plugin_rest_mock_server
Initial value:
= {
mysql_harness::PLUGIN_ABI_VERSION,
mysql_harness::ARCHITECTURE_DESCRIPTOR,
"REST_MOCK_SERVER",
VERSION_NUMBER(0, 0, 1),
0, nullptr,
init,
nullptr,
stop,
true,
}
static const std::array< const char *, 2 > plugin_requires
Definition: rest_mock_server.cc:290
static void start(mysql_harness::PluginFuncEnv *env)
Definition: rest_mock_server.cc:265
static void stop(mysql_harness::PluginFuncEnv *)
Definition: rest_mock_server.cc:276
static void init(mysql_harness::PluginFuncEnv *env)
Definition: rest_mock_server.cc:249

◆ kRestConnectionsUri

constexpr const char kRestConnectionsUri[]
static
Initial value:
{
"^/api/v1/mock_server/connections/$"}

◆ kRestGlobalsUri

constexpr const char kRestGlobalsUri[] {"^/api/v1/mock_server/globals/$"}
static

◆ kSectionName

constexpr const char kSectionName[] {"rest_mock_server"}
static

◆ plugin_requires

const std::array<const char *, 2> plugin_requires
static
Initial value:
= {
"logger",
"http_server",
}