MySQL 8.0.39
Source Code Documentation
rest_routing_plugin.cc File Reference

Classes

class  RestRoutingPluginConfig
 

Macros

#define GET_OPTION_CHECKED(option, section, name, value)
 
#define STR(s)    { s, strlen(s), rapidjson::kPointerInvalidIndex }
 

Typedefs

using StringOption = mysql_harness::StringOption
 
using JsonPointer = RestApiComponent::JsonPointer
 
using JsonValue = RestApiComponent::JsonValue
 

Functions

static void init (mysql_harness::PluginFuncEnv *env)
 
std::string json_pointer_stringfy (const JsonPointer &ptr)
 
static void spec_adder (RestApiComponent::JsonDocument &spec_doc)
 
static void start (mysql_harness::PluginFuncEnv *env)
 

Variables

static const char kSectionName [] {"rest_routing"}
 
static const char kRequireRealm [] {"require_realm"}
 
std::string require_realm_routing
 
static const std::array< JsonPointer::Token, 2 > routing_status_path_tokens
 
static const std::array< JsonPointer::Token, 2 > routing_status_def_tokens
 
static const std::array< JsonPointer::Token, 2 > route_name_param_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_list_def_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_destination_list_def_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_destination_summary_def_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_blockedhost_list_def_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_blockedhost_summary_def_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_connection_list_def_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_connection_summary_def_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_summary_def_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_config_def_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_status_def_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_health_def_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_status_path_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_config_path_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_health_path_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_connection_list_path_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_blockedhost_list_path_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_destination_list_path_tokens
 
static const std::array< JsonPointer::Token, 2 > routes_list_path_tokens
 
static const std::array< JsonPointer::Token, 2 > tags_append_tokens
 
static std::array< const char *, 2 > required
 
mysql_harness::Plugin REST_ROUTING_EXPORT harness_plugin_rest_routing
 

Macro Definition Documentation

◆ GET_OPTION_CHECKED

#define GET_OPTION_CHECKED (   option,
  section,
  name,
  value 
)
Value:
static_assert( \
option = get_option(section, name, value);
static std::string get_option(const mysql_harness::ConfigSection *section, const std::string &key, const std::string &def_value)
Definition: metadata_cache_plugin.cc:107
constexpr bool str_in_collection(const T &t, const std::string_view &k)
Definition: string.h:157
case opt name
Definition: sslopt-case.h:33
static constexpr std::array< const char *, 1 > rest_plugin_supported_options
Definition: supported_rest_options.h:31

◆ STR

#define STR (   s)     { s, strlen(s), rapidjson::kPointerInvalidIndex }

Typedef Documentation

◆ JsonPointer

◆ JsonValue

◆ StringOption

Function Documentation

◆ init()

static void init ( mysql_harness::PluginFuncEnv env)
static

◆ json_pointer_stringfy()

std::string json_pointer_stringfy ( const JsonPointer ptr)

◆ spec_adder()

static void spec_adder ( RestApiComponent::JsonDocument spec_doc)
static

◆ start()

static void start ( mysql_harness::PluginFuncEnv env)
static

Variable Documentation

◆ harness_plugin_rest_routing

mysql_harness::Plugin REST_ROUTING_EXPORT harness_plugin_rest_routing
Initial value:
= {
mysql_harness::PLUGIN_ABI_VERSION,
mysql_harness::ARCHITECTURE_DESCRIPTOR,
"REST_ROUTING",
VERSION_NUMBER(0, 0, 1),
required.size(),
required.data(),
0,
nullptr,
init,
nullptr,
nullptr,
true,
}
static void init(mysql_harness::PluginFuncEnv *env)
Definition: rest_routing_plugin.cc:89
static std::array< const char *, 2 > required
Definition: rest_routing_plugin.cc:1204
static void start(mysql_harness::PluginFuncEnv *env)
Definition: rest_routing_plugin.cc:1171

◆ kRequireRealm

const char kRequireRealm[] {"require_realm"}
static

◆ kSectionName

const char kSectionName[] {"rest_routing"}
static

◆ require_realm_routing

std::string require_realm_routing

◆ required

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

◆ route_name_param_tokens

const std::array<JsonPointer::Token, 2> route_name_param_tokens
static
Initial value:
{
{STR("parameters"), STR("routeNameParam")}}
#define STR(s)
Definition: rest_routing_plugin.cc:154

◆ routes_blockedhost_list_def_tokens

const std::array<JsonPointer::Token, 2> routes_blockedhost_list_def_tokens
static
Initial value:
{
{STR("definitions"), STR("RouteBlockedHostList")}}

◆ routes_blockedhost_list_path_tokens

const std::array<JsonPointer::Token, 2> routes_blockedhost_list_path_tokens
static
Initial value:
{
{STR("paths"), STR("/routes/{routeName}/blockedHosts")}}

◆ routes_blockedhost_summary_def_tokens

const std::array<JsonPointer::Token, 2> routes_blockedhost_summary_def_tokens
static
Initial value:
{
{STR("definitions"), STR("RouteBlockedHostSummary")}}

◆ routes_config_def_tokens

const std::array<JsonPointer::Token, 2> routes_config_def_tokens
static
Initial value:
{
{STR("definitions"), STR("RouteConfig")}}

◆ routes_config_path_tokens

const std::array<JsonPointer::Token, 2> routes_config_path_tokens
static
Initial value:
{
{STR("paths"), STR("/routes/{routeName}/config")}}

◆ routes_connection_list_def_tokens

const std::array<JsonPointer::Token, 2> routes_connection_list_def_tokens
static
Initial value:
{
{STR("definitions"), STR("RouteConnectionsList")}}

◆ routes_connection_list_path_tokens

const std::array<JsonPointer::Token, 2> routes_connection_list_path_tokens
static
Initial value:
{
{STR("paths"), STR("/routes/{routeName}/connections")}}

◆ routes_connection_summary_def_tokens

const std::array<JsonPointer::Token, 2> routes_connection_summary_def_tokens
static
Initial value:
{
{STR("definitions"), STR("RouteConnectionsSummary")}}

◆ routes_destination_list_def_tokens

const std::array<JsonPointer::Token, 2> routes_destination_list_def_tokens
static
Initial value:
{
{STR("definitions"), STR("RouteDestinationList")}}

◆ routes_destination_list_path_tokens

const std::array<JsonPointer::Token, 2> routes_destination_list_path_tokens
static
Initial value:
{
{STR("paths"), STR("/routes/{routeName}/destinations")}}

◆ routes_destination_summary_def_tokens

const std::array<JsonPointer::Token, 2> routes_destination_summary_def_tokens
static
Initial value:
{
{STR("definitions"), STR("RouteDestinationSummary")}}

◆ routes_health_def_tokens

const std::array<JsonPointer::Token, 2> routes_health_def_tokens
static
Initial value:
{
{STR("definitions"), STR("RouteHealth")}}

◆ routes_health_path_tokens

const std::array<JsonPointer::Token, 2> routes_health_path_tokens
static
Initial value:
{
{STR("paths"), STR("/routes/{routeName}/health")}}

◆ routes_list_def_tokens

const std::array<JsonPointer::Token, 2> routes_list_def_tokens
static
Initial value:
{
{STR("definitions"), STR("RouteList")}}

◆ routes_list_path_tokens

const std::array<JsonPointer::Token, 2> routes_list_path_tokens
static
Initial value:
{
{STR("paths"), STR("/routes")}}

◆ routes_status_def_tokens

const std::array<JsonPointer::Token, 2> routes_status_def_tokens
static
Initial value:
{
{STR("definitions"), STR("RouteStatus")}}

◆ routes_status_path_tokens

const std::array<JsonPointer::Token, 2> routes_status_path_tokens
static
Initial value:
{
{STR("paths"), STR("/routes/{routeName}/status")}}

◆ routes_summary_def_tokens

const std::array<JsonPointer::Token, 2> routes_summary_def_tokens
static
Initial value:
{
{STR("definitions"), STR("RouteSummary")}}

◆ routing_status_def_tokens

const std::array<JsonPointer::Token, 2> routing_status_def_tokens
static
Initial value:
{
{STR("definitions"), STR("RoutingGlobalStatus")}}

◆ routing_status_path_tokens

const std::array<JsonPointer::Token, 2> routing_status_path_tokens
static
Initial value:
{
{STR("paths"), STR("/routing/status")}}

◆ tags_append_tokens

const std::array<JsonPointer::Token, 2> tags_append_tokens
static
Initial value:
{
{STR("tags"), STR("-")}}