10#include <userver/components/loggable_component_base.hpp>
11#include <userver/utils/function_ref.hpp>
13#include <userver/ugrpc/client/middlewares/fwd.hpp>
14#include <userver/ugrpc/client/rpc.hpp>
16USERVER_NAMESPACE_BEGIN
26class MiddlewareCallContext
final {
29 MiddlewareCallContext(
const Middlewares& middlewares,
CallAnyBase& call,
30 utils::function_ref<
void()> user_call,
31 const ::google::protobuf::Message* request);
45 Middlewares::const_iterator middleware_;
46 Middlewares::const_iterator middleware_end_;
47 std::optional<utils::function_ref<
void()>> user_call_;
50 const ::google::protobuf::Message* request_;
63 virtual ~MiddlewareBase();
68 virtual void Handle(MiddlewareCallContext& context)
const = 0;
76 virtual ~MiddlewareFactoryBase();
79 std::string_view client_name)
const = 0;