Kagome
Polkadot Runtime Engine in C++17
|
session interface for OpenMetrics service More...
#include <session.hpp>
Classes | |
struct | Configuration |
Public Types | |
using | Body = boost::beast::http::string_body |
using | Request = boost::beast::http::request< Body > |
using | Response = boost::beast::http::response< Body > |
using | Context = boost::asio::io_context |
using | Socket = boost::asio::ip::tcp::socket |
using | ErrorCode = boost::system::error_code |
using | Streambuf = boost::asio::streambuf |
using | Duration = boost::asio::steady_timer::duration |
using | SessionId = uint64_t |
Public Member Functions | |
virtual | ~Session ()=default |
virtual void | start ()=0 |
virtual Socket & | socket ()=0 |
virtual SessionId | id () const =0 |
void | connectOnRequest (std::function< OnRequestSignature > callback) |
connects on request callback More... | |
void | processRequest (Request request, std::shared_ptr< Session > session) |
process request message More... | |
virtual void | respond (Response message)=0 |
send response message More... | |
Private Types | |
using | OnRequestSignature = void(Request, std::shared_ptr< Session > session) |
Private Attributes | |
std::function< OnRequestSignature > | on_request_ |
on request callback More... | |
session interface for OpenMetrics service
Definition at line 19 of file session.hpp.
using kagome::metrics::Session::Body = boost::beast::http::string_body |
Definition at line 21 of file session.hpp.
using kagome::metrics::Session::Context = boost::asio::io_context |
Definition at line 24 of file session.hpp.
using kagome::metrics::Session::Duration = boost::asio::steady_timer::duration |
Definition at line 28 of file session.hpp.
using kagome::metrics::Session::ErrorCode = boost::system::error_code |
Definition at line 26 of file session.hpp.
|
private |
Definition at line 32 of file session.hpp.
using kagome::metrics::Session::Request = boost::beast::http::request<Body> |
Definition at line 22 of file session.hpp.
using kagome::metrics::Session::Response = boost::beast::http::response<Body> |
Definition at line 23 of file session.hpp.
using kagome::metrics::Session::SessionId = uint64_t |
Definition at line 29 of file session.hpp.
using kagome::metrics::Session::Socket = boost::asio::ip::tcp::socket |
Definition at line 25 of file session.hpp.
using kagome::metrics::Session::Streambuf = boost::asio::streambuf |
Definition at line 27 of file session.hpp.
|
virtualdefault |
|
inline |
connects on request
callback
Definition at line 55 of file session.hpp.
|
pure virtual |
Implemented in kagome::metrics::SessionImpl.
|
inline |
process request message
Definition at line 62 of file session.hpp.
|
pure virtual |
send response message
Implemented in kagome::metrics::SessionImpl.
|
pure virtual |
Implemented in kagome::metrics::SessionImpl.
|
pure virtual |
Implemented in kagome::metrics::SessionImpl.
|
private |
on request
callback
Definition at line 33 of file session.hpp.