Class: GRPC::ClientInterceptor
- Inherits:
-
Interceptor
- Object
- Interceptor
- GRPC::ClientInterceptor
- Defined in:
- src/ruby/lib/grpc/generic/interceptors.rb
Overview
ClientInterceptor allows for wrapping outbound gRPC client stub requests. This is an EXPERIMENTAL API.
Direct Known Subclasses
Instance Method Summary collapse
-
#bidi_streamer(requests: nil, call: nil, method: nil, metadata: nil) ⇒ Object
Intercept a BiDi streaming call.
-
#client_streamer(requests: nil, call: nil, method: nil, metadata: nil) ⇒ Object
Intercept a client streaming call.
-
#request_response(request: nil, call: nil, method: nil, metadata: nil) ⇒ Object
Intercept a unary request response call.
-
#server_streamer(request: nil, call: nil, method: nil, metadata: nil) ⇒ Object
Intercept a server streaming call.
Methods inherited from Interceptor
Constructor Details
This class inherits a constructor from GRPC::Interceptor
Instance Method Details
#bidi_streamer(requests: nil, call: nil, method: nil, metadata: nil) ⇒ Object
Intercept a BiDi streaming call
86 87 88 89 90 |
# File 'src/ruby/lib/grpc/generic/interceptors.rb', line 86 def bidi_streamer(requests: nil, call: nil, method: nil, metadata: nil) GRPC.logger.debug "Intercepting bidi streamer method #{method}" \ " for requests #{requests} with call #{call} and metadata: #{}" yield end |
#client_streamer(requests: nil, call: nil, method: nil, metadata: nil) ⇒ Object
Intercept a client streaming call
58 59 60 61 62 |
# File 'src/ruby/lib/grpc/generic/interceptors.rb', line 58 def client_streamer(requests: nil, call: nil, method: nil, metadata: nil) GRPC.logger.debug "Intercepting client streamer method #{method}" \ " for requests #{requests} with call #{call} and metadata: #{}" yield end |
#request_response(request: nil, call: nil, method: nil, metadata: nil) ⇒ Object
Intercept a unary request response call
44 45 46 47 48 |
# File 'src/ruby/lib/grpc/generic/interceptors.rb', line 44 def request_response(request: nil, call: nil, method: nil, metadata: nil) GRPC.logger.debug "Intercepting request response method #{method}" \ " for request #{request} with call #{call} and metadata: #{}" yield end |
#server_streamer(request: nil, call: nil, method: nil, metadata: nil) ⇒ Object
Intercept a server streaming call
72 73 74 75 76 |
# File 'src/ruby/lib/grpc/generic/interceptors.rb', line 72 def server_streamer(request: nil, call: nil, method: nil, metadata: nil) GRPC.logger.debug "Intercepting server streamer method #{method}" \ " for request #{request} with call #{call} and metadata: #{}" yield end |