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