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