MySQL 8.0.39
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 "mysql/harness/plugin_config.h"
#include "mysqlrouter/http_server_component.h"
#include "mysqlrouter/mock_server_component.h"
#include "scope_guard.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 const char * http_method_to_string (const HttpMethod::type method)
 
static void init (mysql_harness::PluginFuncEnv *env)
 
static void run (mysql_harness::PluginFuncEnv *env)
 

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

◆ http_method_to_string()

static const char * http_method_to_string ( const HttpMethod::type  method)
static

◆ init()

static void init ( mysql_harness::PluginFuncEnv env)
static

◆ run()

static void run ( mysql_harness::PluginFuncEnv env)
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,
run,
nullptr,
true,
0,
nullptr,
}
static void init(mysql_harness::PluginFuncEnv *env)
Definition: rest_mock_server.cc:284
static const std::array< const char *, 2 > plugin_requires
Definition: rest_mock_server.cc:326
static void run(mysql_harness::PluginFuncEnv *env)
Definition: rest_mock_server.cc:300

◆ kRestConnectionsUri

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

◆ kRestGlobalsUri

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

◆ kSectionName

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

◆ plugin_requires

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