Module interceptor

Module interceptor 

Expand description

gRPC interceptors which are a kind of middleware.

gRPC interceptors are similar to regular rama middleware Services. but have less flexibility. An interceptor allows you to do two main things, one is to add/remove/check items in the MetadataMap of each request. Two, cancel a request with a Status.

An interceptor can be used on both the server and client.

If you need more powerful middleware, regular rama layers are the recommended approach.

Additionally, interceptors is not the recommended way to add logging to your service. For that a rama middleware is more appropriate since it can also act on the response. For example rama-http’s Trace middleware supports gRPC out of the box.

Structs§

InterceptedService
A service wrapped in an interceptor middleware.
InterceptorLayer
A gRPC interceptor that can be used as a Layer,