Malloy
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Friends | List of all members
malloy::server::routing_context Class Reference

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_contextoperator= (const routing_context &rhs)=delete
 
routing_contextoperator= (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::routerrouter () const noexcept
 
constexpr malloy::server::routerrouter () noexcept
 

Friends

session start (routing_context &&ctrl)
 

Detailed Description

A high-level controller.

This is a high-level controller for convenience. It will setup the necessary I/O context and worker threads.

Member Function Documentation

◆ init_tls() [1/2]

bool routing_context::init_tls ( const std::filesystem::path &  cert_path,
const std::filesystem::path &  key_path 
)

Initialize the TLS context.

Note
This must be called after init() but before start() if TLS is to be used.
Parameters
cert_pathPath to the certificate file.
key_pathPath to the key file.
Returns
Whether the initialization was successful.
Here is the call graph for this function:

◆ init_tls() [2/2]

bool routing_context::init_tls ( const std::string &  cert,
const std::string &  key 
)

Initialize the TLS context.

Note
This must be called after init() but before start() if TLS is to be used.
Parameters
certThe certificate file (contents).
keyThe key file (contents).
Returns
Whether the initialization was successful.
Here is the call graph for this function:

◆ router() [1/2]

constexpr const malloy::server::router & malloy::server::routing_context::router ( ) const
inlineconstexprnoexcept

Get the top-level router.

Returns
The top-level router.

◆ router() [2/2]

constexpr malloy::server::router & malloy::server::routing_context::router ( )
inlineconstexprnoexcept

Get the top-level router.

Returns
The top-level router.

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