userver: userver/ugrpc/server/middlewares/baggage/component.hpp Source File
Loading...
Searching...
No Matches
component.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/ugrpc/server/middlewares/baggage/component.hpp
4/// @brief @copybrief
5/// ugrpc::server::middlewares::baggage::Component
6
7#include <userver/ugrpc/server/middlewares/base.hpp>
8
9USERVER_NAMESPACE_BEGIN
10
11/// Server baggage middleware
12namespace ugrpc::server::middlewares::baggage {
13
14// clang-format off
15
16/// @ingroup userver_components userver_base_classes
17///
18/// @brief Component for gRPC server baggage
19///
20/// The component does **not** have any options for service config.
21///
22/// ## Static configuration example:
23///
24/// @snippet grpc/functional_tests/basic_chaos/static_config.yaml Sample grpc server baggage middleware component config
25
26// clang-format on
27
28class Component final : public MiddlewareComponentBase {
29public:
30 /// @ingroup userver_component_names
31 /// @brief The default name of ugrpc::server::middlewares::baggage::Component
32 static constexpr std::string_view kName = "grpc-server-baggage";
33
34 Component(const components::ComponentConfig& config, const components::ComponentContext& context);
35
36 std::shared_ptr<MiddlewareBase> GetMiddleware() override;
37
38 static yaml_config::Schema GetStaticConfigSchema();
39};
40
41} // namespace ugrpc::server::middlewares::baggage
42
43USERVER_NAMESPACE_END