3#include <userver/formats/json/value.hpp>
5#include <userver/components/component_context.hpp>
6#include <userver/engine/task/task_processor_fwd.hpp>
7#include <userver/server/congestion_control/limiter.hpp>
8#include <userver/server/congestion_control/sensor.hpp>
9#include <userver/server/handlers/fallback_handlers.hpp>
10#include <userver/server/handlers/http_handler_base.hpp>
11#include <userver/storages/secdist/component.hpp>
12#include <userver/utils/statistics/fwd.hpp>
14USERVER_NAMESPACE_BEGIN
19struct StatsAggregation;
23class HttpRequestHandler;
35 const storages::
secdist::SecdistConfig& secdist,
36 const components::ComponentContext& component_context
40 const ServerConfig& GetConfig()
const;
42 std::vector<std::string> GetCommonMiddlewares()
const;
44 void WriteMonitorData(
utils::statistics::Writer& writer)
const;
46 void WriteTotalHandlerStatistics(
utils::statistics::Writer& writer)
const;
48 net::StatsAggregation GetServerStats()
const;
50 void AddHandler(
const handlers::
HttpHandlerBase& handler, engine::TaskProcessor& task_processor);
52 size_t GetThrottlableHandlersCount()
const;
54 const http::HttpRequestHandler& GetHttpRequestHandler(
bool is_monitor =
false)
const;
60 RequestsView& GetRequestsView();
62 void SetLimit(std::optional<size_t> new_limit)
override;
64 void SetRpsRatelimit(std::optional<size_t> rps);
66 void SetRpsRatelimitStatusCode(
http::HttpStatus status_code);
68 std::uint64_t GetTotalRequests()
const override;
71 std::unique_ptr<ServerImpl> pimpl;