userver: ugrpc::server::MiddlewareBase Class Reference
Loading...
Searching...
No Matches
ugrpc::server::MiddlewareBase Class Referenceabstract

#include <userver/ugrpc/server/middlewares/base.hpp>

Detailed Description

Base class for server gRPC middleware.

Examples
samples/grpc_middleware_service/src/middlewares/server/middleware.hpp.

Definition at line 61 of file base.hpp.

Public Member Functions

 MiddlewareBase (const MiddlewareBase &)=delete
 
MiddlewareBaseoperator= (const MiddlewareBase &)=delete
 
MiddlewareBaseoperator= (MiddlewareBase &&)=delete
 
virtual void Handle (MiddlewareCallContext &context) const =0
 Handles the gRPC request.
 
virtual void CallRequestHook (const MiddlewareCallContext &context, google::protobuf::Message &request)
 Request hook. The function is invoked on each request.
 
virtual void CallResponseHook (const MiddlewareCallContext &context, google::protobuf::Message &response)
 Response hook. The function is invoked on each response.
 

Member Function Documentation

◆ Handle()

virtual void ugrpc::server::MiddlewareBase::Handle ( MiddlewareCallContext & context) const
pure virtual

Handles the gRPC request.

Note
You should call context.Next() inside, otherwise the call will be dropped

The documentation for this class was generated from the following file: