9#include <userver/logging/fwd.hpp>
10#include <userver/server/request/response_base.hpp>
12USERVER_NAMESPACE_BEGIN
24 virtual ~RequestBase();
26 virtual bool IsFinal()
const = 0;
27 virtual bool IsUpgradeWebsocket()
const = 0;
28 virtual void DoUpgrade(std::unique_ptr<engine::io::RwBase>&& socket,
29 engine::
io::Sockaddr&& peer_name)
const = 0;
33 virtual void WriteAccessLogs(
const logging::LoggerPtr& logger_access,
34 const logging::LoggerPtr& logger_access_tskv,
35 const std::string& remote_address)
const = 0;
37 virtual const std::string& GetRequestPath()
const = 0;
39 void SetTaskCreateTime();
40 void SetTaskStartTime();
41 void SetResponseNotifyTime();
42 void SetResponseNotifyTime(std::chrono::steady_clock::time_point now);
43 void SetStartSendResponseTime();
44 void SetFinishSendResponseTime();
46 virtual void SetMatchedPathLength(size_t length) = 0;
48 std::chrono::steady_clock::time_point StartTime()
const {
52 virtual void MarkAsInternalServerError()
const = 0;
54 virtual void AccountResponseTime() = 0;
58 std::chrono::steady_clock::time_point start_time_;
60 std::chrono::steady_clock::time_point task_create_time_;
62 std::chrono::steady_clock::time_point task_start_time_;
64 std::chrono::steady_clock::time_point response_notify_time_;
66 std::chrono::steady_clock::time_point start_send_response_time_;
68 std::chrono::steady_clock::time_point finish_send_response_time_;