Class: GrpcKit::Interceptors::Server::RequestResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/grpc_kit/interceptors/server_request_response.rb

Instance Method Summary collapse

Constructor Details

#initialize(interceptors) ⇒ RequestResponse

Returns a new instance of RequestResponse.

Parameters:



10
11
12
# File 'lib/grpc_kit/interceptors/server_request_response.rb', line 10

def initialize(interceptors)
  @registry = GrpcKit::InterceptorRegistry.new(interceptors)
end

Instance Method Details

#intercept(request, call, &block) ⇒ Object

Parameters:

Yield Returns:

  • (Object)

    Response object server sent



17
18
19
# File 'lib/grpc_kit/interceptors/server_request_response.rb', line 17

def intercept(request, call, &block)
  do_intercept(@registry.build, request, call, &block)
end