Malloy
|
A high-level controller. More...
#include <routing_context.hpp>
Classes | |
struct | config |
Public Types | |
using | session = malloy::detail::controller_run_result< std::shared_ptr< malloy::server::listener > > |
Public Member Functions | |
routing_context (config cfg) | |
routing_context (const routing_context &other)=delete | |
routing_context (routing_context &&other) noexcept=default | |
routing_context & | operator= (const routing_context &rhs)=delete |
routing_context & | operator= (routing_context &&rhs) noexcept=default |
bool | init_tls (const std::filesystem::path &cert_path, const std::filesystem::path &key_path) |
bool | init_tls (const std::string &cert, const std::string &key) |
constexpr const malloy::server::router & | router () const noexcept |
constexpr malloy::server::router & | router () noexcept |
Friends | |
session | start (routing_context &&ctrl) |
A high-level controller.
This is a high-level controller for convenience. It will setup the necessary I/O context and worker threads.
bool routing_context::init_tls | ( | const std::filesystem::path & | cert_path, |
const std::filesystem::path & | key_path | ||
) |
Initialize the TLS context.
init()
but before start()
if TLS is to be used.cert_path | Path to the certificate file. |
key_path | Path to the key file. |
bool routing_context::init_tls | ( | const std::string & | cert, |
const std::string & | key | ||
) |
Initialize the TLS context.
init()
but before start()
if TLS is to be used.cert | The certificate file (contents). |
key | The key file (contents). |
|
inlineconstexprnoexcept |
Get the top-level router.
|
inlineconstexprnoexcept |
Get the top-level router.