6#include <userver/dynamic_config/fwd.hpp>
7#include <userver/formats/json_fwd.hpp>
8#include <userver/yaml_config/fwd.hpp>
10namespace dynamic_config::http_client_connect_throttle {
11struct VariableTypeRaw;
12using VariableType = VariableTypeRaw;
15USERVER_NAMESPACE_BEGIN
21namespace clients::http {
24 bool update_header{
true};
27enum class CancellationPolicy {
35struct ClientSettings
final {
36 std::string thread_name_prefix{};
40 CancellationPolicy cancellation_policy{CancellationPolicy::kCancel};
35struct ClientSettings
final {
…};
47namespace clients::http::impl {
49struct ThrottleConfig
final {
50 static constexpr size_t kNoLimit = -1;
52 std::size_t http_connect_limit{kNoLimit};
53 std::chrono::microseconds http_connect_rate{0};
54 std::size_t https_connect_limit{kNoLimit};
55 std::chrono::microseconds https_connect_rate{0};
56 std::size_t per_host_connect_limit{kNoLimit};
57 std::chrono::microseconds per_host_connect_rate{0};
60ThrottleConfig Parse(
const ::dynamic_config::http_client_connect_throttle::VariableType&);
64 static constexpr std::size_t kDefaultConnectionPoolSize = 10000;
66 std::size_t connection_pool_size{kDefaultConnectionPoolSize};
68 ThrottleConfig throttle;