6#include <userver/dynamic_config/fwd.hpp>
7#include <userver/formats/json_fwd.hpp>
8#include <userver/yaml_config/fwd.hpp>
10USERVER_NAMESPACE_BEGIN
16namespace server::http {
17class HeadersPropagator;
20namespace clients::
http::impl {
22struct DeadlinePropagationConfig {
23 bool update_header{
true};
27struct ClientSettings
final {
28 std::string thread_name_prefix{};
30 bool defer_events{
false};
31 DeadlinePropagationConfig deadline_propagation{};
33 const server::http::HeadersPropagator* headers_propagator{
nullptr};
37 formats::
parse::
To<ClientSettings>);
39struct ThrottleConfig
final {
40 static constexpr size_t kNoLimit = -1;
42 std::size_t http_connect_limit{kNoLimit};
43 std::chrono::microseconds http_connect_rate{0};
44 std::size_t https_connect_limit{kNoLimit};
45 std::chrono::microseconds https_connect_rate{0};
46 std::size_t per_host_connect_limit{kNoLimit};
47 std::chrono::microseconds per_host_connect_rate{0};
50ThrottleConfig Parse(
const formats::
json::Value& value,
51 formats::
parse::
To<ThrottleConfig>);
55 static constexpr std::size_t kDefaultConnectionPoolSize = 10000;
57 std::size_t connection_pool_size{kDefaultConnectionPoolSize};
59 ThrottleConfig throttle;
62Config ParseConfig(
const dynamic_config::DocsMap& docs_map);