20#ifndef ORES_HTTP_SERVER_MESSAGING_HTTP_INFO_HANDLER_HPP
21#define ORES_HTTP_SERVER_MESSAGING_HTTP_INFO_HANDLER_HPP
24#include "ores.logging/make_logger.hpp"
25#include "ores.nats/domain/message.hpp"
26#include "ores.nats/service/client.hpp"
27#include "ores.service/messaging/handler_helpers.hpp"
28#include "ores.http.api/messaging/http_info_protocol.hpp"
30namespace ores::http_server::messaging {
33inline auto& http_info_handler_lg() {
34 static auto instance = ores::logging::make_logger(
35 "ores.http.server.messaging.http_info_handler");
40using ores::service::messaging::reply;
41using ores::service::messaging::decode;
54 : nats_(nats), base_url_(std::move(base_url)) {}
57 BOOST_LOG_SEV(http_info_handler_lg(), debug)
63 reply(nats_, msg, resp);
65 BOOST_LOG_SEV(http_info_handler_lg(), debug)
66 <<
"Replied with base_url: " << base_url_;
71 std::string base_url_;
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Response to get_http_info_request.
Definition http_info_protocol.hpp:46
std::string base_url
The HTTP server's base URL, e.g. "http://localhost:51000".
Definition http_info_protocol.hpp:50
Handles service discovery requests for the HTTP server's base URL.
Definition http_info_handler.hpp:50
A received NATS message.
Definition message.hpp:40
std::string subject
The subject the message was published to.
Definition message.hpp:44
NATS client: connection, pub/sub, request/reply, and JetStream.
Definition client.hpp:73