MySQL 8.0.39
Source Code Documentation
HttpServerComponent Class Reference

#include <http_server_component.h>

Classes

struct  RouterData
 

Public Member Functions

void init (std::shared_ptr< HttpServer > srv)
 
void add_route (const std::string &url_regex, std::unique_ptr< BaseRequestHandler > cb)
 
void remove_route (const std::string &url_regex)
 

Static Public Member Functions

static HttpServerComponentget_instance ()
 

Private Member Functions

 HttpServerComponent (HttpServerComponent const &)=delete
 
void operator= (HttpServerComponent const &)=delete
 
 HttpServerComponent ()=default
 

Private Attributes

std::mutex rh_mu
 
std::vector< RouterDatarequest_handlers_
 
std::weak_ptr< HttpServersrv_
 

Constructor & Destructor Documentation

◆ HttpServerComponent() [1/2]

HttpServerComponent::HttpServerComponent ( HttpServerComponent const &  )
privatedelete

◆ HttpServerComponent() [2/2]

HttpServerComponent::HttpServerComponent ( )
privatedefault

Member Function Documentation

◆ add_route()

void HttpServerComponent::add_route ( const std::string &  url_regex,
std::unique_ptr< BaseRequestHandler cb 
)

◆ get_instance()

HttpServerComponent & HttpServerComponent::get_instance ( )
static

◆ init()

void HttpServerComponent::init ( std::shared_ptr< HttpServer srv)

◆ operator=()

void HttpServerComponent::operator= ( HttpServerComponent const &  )
privatedelete

◆ remove_route()

void HttpServerComponent::remove_route ( const std::string &  url_regex)

Member Data Documentation

◆ request_handlers_

std::vector<RouterData> HttpServerComponent::request_handlers_
private

◆ rh_mu

std::mutex HttpServerComponent::rh_mu
private

◆ srv_

std::weak_ptr<HttpServer> HttpServerComponent::srv_
private

The documentation for this class was generated from the following files: