class GRPC::ClientInterceptor
ClientInterceptor
allows for wrapping outbound gRPC client stub requests. This is an EXPERIMENTAL API.
Public Instance Methods
bidi_streamer(requests: nil, call: nil, method: nil, metadata: nil) { || ... }
click to toggle source
Intercept a BiDi streaming call
@param [Enumerable] requests @param [GRPC::ActiveCall] call @param [String] method @param [Hash] metadata
# 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: #{metadata}" yield end
client_streamer(requests: nil, call: nil, method: nil, metadata: nil) { || ... }
click to toggle source
Intercept a client streaming call
@param [Enumerable] requests @param [GRPC::ActiveCall] call @param [String] method @param [Hash] metadata
# 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: #{metadata}" yield end
request_response(request: nil, call: nil, method: nil, metadata: nil) { || ... }
click to toggle source
Intercept a unary request response call
@param [Object] request @param [GRPC::ActiveCall] call @param [String] method @param [Hash] metadata
# 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: #{metadata}" yield end
server_streamer(request: nil, call: nil, method: nil, metadata: nil) { || ... }
click to toggle source
Intercept a server streaming call
@param [Object] request @param [GRPC::ActiveCall] call @param [String] method @param [Hash] metadata
# 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: #{metadata}" yield end