userver: userver/clients/http/plugins/retry_budget/component.hpp Source File
Loading...
Searching...
No Matches
component.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/clients/http/plugins/retry_budget/component.hpp
4/// @brief @copybrief clients::http::plugins::retry_budget::Component
5
6#include <memory>
7
8#include <userver/clients/http/plugin_component.hpp>
9
10USERVER_NAMESPACE_BEGIN
11
12namespace clients::http::plugins::retry_budget {
13
14class Plugin;
15
16class Component final : public plugin::ComponentBase {
17public:
18 /// @ingroup userver_component_names
19 /// @brief The default name of
20 /// clients::http::plugins::retry_budget::Component component
21 static constexpr std::string_view kName = "http-client-plugin-retry-budget";
22
23 Component(const components::ComponentConfig&, const components::ComponentContext&);
24
25 ~Component() override;
26
27 http::Plugin& GetPlugin() override;
28
29 static yaml_config::Schema GetStaticConfigSchema();
30
31private:
32 std::unique_ptr<retry_budget::Plugin> plugin_;
33};
34
35} // namespace clients::http::plugins::retry_budget
36
37template <>
38inline constexpr bool components::kHasValidate<clients::http::plugins::retry_budget::Component> = true;
39
40USERVER_NAMESPACE_END