userver: userver/ugrpc/server/middlewares/deadline_propagation/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/deadline_propagation/component.hpp
4/// @brief @copybrief
5/// ugrpc::server::middlewares::deadline_propagation::Component
6
7#include <userver/ugrpc/server/middlewares/base.hpp>
8
9USERVER_NAMESPACE_BEGIN
10
11/// Server deadline propagation middleware
12namespace ugrpc::server::middlewares::deadline_propagation {
13
14// clang-format off
15
16/// @ingroup userver_components userver_base_classes
17///
18/// @brief Component for gRPC server deadline propagation
19/// @see @ref scripts/docs/en/userver/deadline_propagation.md
20///
21/// The component does **not** have any options for service config.
22///
23/// ## Static configuration example:
24///
25/// @snippet grpc/functional_tests/basic_chaos/static_config.yaml Sample grpc server deadline propagation middleware component config
26
27// clang-format on
28
29class Component final : public MiddlewareComponentBase {
30 public:
31 /// @ingroup userver_component_names
32 /// @brief The default name of
33 // ugrpc::server::middlewares::deadline_propagation::Component
34 static constexpr std::string_view kName = "grpc-server-deadline-propagation";
35
36 Component(const components::ComponentConfig& config,
37 const components::ComponentContext& context);
38
39 std::shared_ptr<MiddlewareBase> GetMiddleware() override;
40
41 static yaml_config::Schema GetStaticConfigSchema();
42};
43
44} // namespace ugrpc::server::middlewares::deadline_propagation
45
46USERVER_NAMESPACE_END