Definition at line 32 of file middleware.hpp.
Public Member Functions | |
Middleware (const Settings &settings) | |
void | PostRecvMessage (ugrpc::server::MiddlewareCallContext &context, google::protobuf::Message &request) const override |
The function is invoked after each received message. | |
virtual void | OnCallStart (MiddlewareCallContext &context) const |
This hook is invoked once per Call (RPC), after the message metadata is received, but before the handler function is called. | |
virtual void | PreSendMessage (MiddlewareCallContext &context, google::protobuf::Message &response) const |
The function is invoked before each sended message. | |
virtual void | OnCallFinish (MiddlewareCallContext &context, const grpc::Status &status) const |
This hook is invoked once per Call (RPC), after the handler function returns, but before the message is sent to the upstream client. | |
|
explicit |
Definition at line 20 of file middleware.cpp.
|
virtualinherited |
This hook is invoked once per Call (RPC), after the handler function returns, but before the message is sent to the upstream client.
All OnCallStart invoked in the reverse order relatively OnCallFinish. You can change grpc status and it will apply for a rpc call.
Reimplemented in ugrpc::server::middlewares::deadline_propagation::Middleware.
|
virtualinherited |
This hook is invoked once per Call (RPC), after the message metadata is received, but before the handler function is called.
If all OnCallStart succeeded => OnCallFinish will invoked after a success method call.
Reimplemented in ugrpc::server::middlewares::baggage::Middleware, and ugrpc::server::middlewares::deadline_propagation::Middleware.
|
overridevirtual |
The function is invoked after each received message.
PostRecvMessage is called:
Reimplemented from ugrpc::server::MiddlewareBase.
Definition at line 25 of file middleware.cpp.
|
virtualinherited |
The function is invoked before each sended message.
PreSendMessage is called: