MySQL  8.0.18
Source Code Documentation
rest_mock_server.cc File Reference
#include <atomic>
#include <chrono>
#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 (PluginFuncEnv *env)
 
static void start (PluginFuncEnv *)
 
static void stop (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 []
 
const char * plugin_requires []
 
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 ( PluginFuncEnv env)
static

◆ start()

static void start ( PluginFuncEnv )
static

◆ stop()

static void stop ( PluginFuncEnv )
static

Variable Documentation

◆ harness_plugin_rest_mock_server

Plugin DLLEXPORT harness_plugin_rest_mock_server
Initial value:
= {
PLUGIN_ABI_VERSION,
ARCHITECTURE_DESCRIPTOR,
"REST_MOCK_SERVER",
VERSION_NUMBER(0, 0, 1),
sizeof(plugin_requires) / sizeof(plugin_requires[0]),
0,
nullptr,
init,
nullptr,
stop,
}
static void init(PluginFuncEnv *env)
Definition: rest_mock_server.cc:252
static void stop(PluginFuncEnv *)
Definition: rest_mock_server.cc:277
static void start(PluginFuncEnv *)
Definition: rest_mock_server.cc:268
const char * plugin_requires[]
Definition: rest_mock_server.cc:291

◆ 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 char* plugin_requires[]
Initial value:
= {
"http_server",
}