MySQL 9.1.0
Source Code Documentation
http_server_plugin.cc File Reference
#include <array>
#include <atomic>
#include <chrono>
#include <future>
#include <memory>
#include <mutex>
#include <sstream>
#include <stdexcept>
#include <system_error>
#include <thread>
#include <sys/types.h>
#include <unicode/uclean.h>
#include "my_thread.h"
#include "mysql/harness/config_option.h"
#include "mysql/harness/config_parser.h"
#include "mysql/harness/dynamic_config.h"
#include "mysql/harness/loader.h"
#include "mysql/harness/logging/logging.h"
#include "mysql/harness/net_ts/impl/socket_error.h"
#include "mysql/harness/net_ts/internet.h"
#include "mysql/harness/net_ts/io_context.h"
#include "mysql/harness/net_ts/socket.h"
#include "mysql/harness/plugin.h"
#include "mysql/harness/plugin_config.h"
#include "mysql/harness/stdx/expected.h"
#include "mysql/harness/utility/string.h"
#include "scope_guard.h"
#include "http/http_server_context.h"
#include "http_auth.h"
#include "mysql/harness/section_config_exposer.h"
#include "mysql/harness/tls_server_context.h"
#include "mysqlrouter/component/http_auth_realm_component.h"
#include "mysqlrouter/component/http_server_component.h"
#include "mysqlrouter/http_constants.h"
#include "mysqlrouter/http_server_export.h"
#include "mysqlrouter/io_component.h"
#include "mysqlrouter/supported_http_options.h"
#include "static_files.h"

Classes

class  HttpServerPluginConfig
 
class  HttpServerFactory
 
class  anonymous_namespace{http_server_plugin.cc}::HttpServerConfigExposer
 

Namespaces

namespace  anonymous_namespace{http_server_plugin.cc}
 

Macros

#define GET_OPTION_CHECKED(option, section, name, value)
 

Functions

static void init (mysql_harness::PluginFuncEnv *env)
 
static void deinit (mysql_harness::PluginFuncEnv *)
 
static void start (mysql_harness::PluginFuncEnv *env)
 
static void expose_configuration (mysql_harness::PluginFuncEnv *env, const char *, bool initial)
 

Variables

static constexpr const char kHttpServerSectionName [] {"http_server"}
 HTTP server plugin. More...
 
static constexpr const char kDefaultBindAddress [] {"0.0.0.0"}
 
static constexpr const uint16_t kDefaultPort {8081}
 
static constexpr const unsigned kDefaultSsl {0}
 
static std::map< std::string, std::shared_ptr< http::HttpServerContext > > http_servers
 
static std::mutex io_context_work_guard_mtx
 
static std::list< IoComponent::Workguardio_context_work_guards
 
static constexpr std::array required
 
mysql_harness::Plugin HTTP_SERVER_EXPORT harness_plugin_http_server
 

Macro Definition Documentation

◆ GET_OPTION_CHECKED

#define GET_OPTION_CHECKED (   option,
  section,
  name,
  value 
)
Value:
static_assert( \
option = get_option(section, name, value);
constexpr bool str_in_collection(const T &t, const std::string_view &k)
Definition: string.h:94
case opt name
Definition: sslopt-case.h:29
static constexpr std::array http_server_supported_options
Definition: supported_http_options.h:31

Function Documentation

◆ deinit()

static void deinit ( mysql_harness::PluginFuncEnv )
static

◆ expose_configuration()

static void expose_configuration ( mysql_harness::PluginFuncEnv env,
const char *  ,
bool  initial 
)
static

◆ init()

static void init ( mysql_harness::PluginFuncEnv env)
static

◆ start()

static void start ( mysql_harness::PluginFuncEnv env)
static

Variable Documentation

◆ harness_plugin_http_server

mysql_harness::Plugin HTTP_SERVER_EXPORT harness_plugin_http_server
Initial value:
= {
mysql_harness::PLUGIN_ABI_VERSION,
mysql_harness::ARCHITECTURE_DESCRIPTOR,
"HTTP_SERVER",
VERSION_NUMBER(0, 0, 1),
required.size(),
required.data(),
0,
nullptr,
init,
nullptr,
true,
}
static constexpr std::array required
Definition: http_server_plugin.cc:350
static void expose_configuration(mysql_harness::PluginFuncEnv *env, const char *, bool initial)
Definition: http_server_plugin.cc:395
static void init(mysql_harness::PluginFuncEnv *env)
Definition: http_server_plugin.cc:212
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_server_plugin.cc:300
static void deinit(mysql_harness::PluginFuncEnv *)
Definition: http_server_plugin.cc:292

◆ http_servers

std::map<std::string, std::shared_ptr<http::HttpServerContext> > http_servers
static

◆ io_context_work_guard_mtx

std::mutex io_context_work_guard_mtx
static

◆ io_context_work_guards

std::list<IoComponent::Workguard> io_context_work_guards
static

◆ kDefaultBindAddress

constexpr const char kDefaultBindAddress[] {"0.0.0.0"}
staticconstexpr

◆ kDefaultPort

constexpr const uint16_t kDefaultPort {8081}
staticconstexpr

◆ kDefaultSsl

constexpr const unsigned kDefaultSsl {0}
staticconstexpr

◆ kHttpServerSectionName

constexpr const char kHttpServerSectionName[] {"http_server"}
staticconstexpr

HTTP server plugin.

◆ required

constexpr std::array required
staticconstexpr
Initial value:
{
"logger",
"router_openssl",
"router_protobuf",
"io",
}