userver: samples/grpc_middleware_service/src/middlewares/client/middleware.hpp
Loading...
Searching...
No Matches
samples/grpc_middleware_service/src/middlewares/client/middleware.hpp
#pragma once
#include <userver/ugrpc/client/middlewares/base.hpp>
namespace sample::grpc::auth::client {
class Middleware final : public ugrpc::client::MiddlewareBase {
public:
explicit Middleware();
~Middleware() override;
void Handle(ugrpc::client::MiddlewareCallContext& context) const override;
};
class MiddlewareFactory final : public ugrpc::client::MiddlewareFactoryBase {
public:
explicit MiddlewareFactory(const components::ComponentContext& context);
~MiddlewareFactory() override;
std::shared_ptr<const ugrpc::client::MiddlewareBase> GetMiddleware(
std::string_view) const override;
};
} // namespace sample::grpc::auth::client