def request_response(method, req, marshal, unmarshal,
                         deadline: nil,
                         return_op: false,
                         parent: nil,
                         credentials: nil,
                         metadata: {})
      c = new_active_call(method, marshal, unmarshal,
                          deadline: deadline,
                          parent: parent,
                          credentials: credentials)
      interception_context = @interceptors.build_context
      intercept_args = {
        method: method,
        request: req,
        call: c.interceptable,
        metadata: metadata
      }
      if return_op
        # return the operation view of the active_call; define #execute as a
        # new method for this instance that invokes #request_response.
        c.merge_metadata_to_send(metadata)
        op = c.operation
        op.define_singleton_method(:execute) do
          interception_context.intercept!(:request_response, intercept_args) do
            c.request_response(req, metadata: metadata)
          end
        end
        op
      else
        interception_context.intercept!(:request_response, intercept_args) do
          c.request_response(req, metadata: metadata)
        end
      end
    end
def request_response(method, req, marshal, unmarshal,
                         deadline: nil,
                         return_op: false,
                         parent: nil,
                         credentials: nil,
                         metadata: {})
      c = new_active_call(method, marshal, unmarshal,
                          deadline: deadline,
                          parent: parent,
                          credentials: credentials)
      interception_context = @interceptors.build_context
      intercept_args = {
        method: method,
        request: req,
        call: c.interceptable,
        metadata: metadata
      }
      if return_op
        # return the operation view of the active_call; define #execute as a
        # new method for this instance that invokes #request_response.
        c.merge_metadata_to_send(metadata)
        op = c.operation
        op.define_singleton_method(:execute) do
          interception_context.intercept!(:request_response, intercept_args) do
            c.request_response(req, metadata: metadata)
          end
        end
        op
      else
        interception_context.intercept!(:request_response, intercept_args) do
          c.request_response(req, metadata: metadata)
        end
      end
    end
Creates a new ClientStub.

 Minimally, a stub is created with the just the host of the gRPC service
 it wishes to access, e.g.,

   my_stub = ClientStub.new(example.host.com:50505,
                            :this_channel_is_insecure)

 If a channel_override argument is passed, it will be used as the
 underlying channel. Otherwise, the channel_args argument will be used
 to construct a new underlying channel.

 There are some specific keyword args that are not used to configure the
 channel:

 - :channel_override
 when present, this must be a pre-created GRPC::Core::Channel.  If it's
 present the host and arbitrary keyword arg areignored, and the RPC
 connection uses this channel.

 - :timeout
 when present, this is the default timeout used for calls

 @param host [String] the host the stub connects to
 @param creds [Core::ChannelCredentials|Symbol] the channel credentials, or
     :this_channel_is_insecure, which explicitly indicates that the client
     should be created with an insecure connection. Note: this argument is
     ignored if the channel_override argument is provided.
 @param channel_override [Core::Channel] a pre-created channel
 @param timeout [Number] the default timeout to use in requests
 @param propagate_mask [Number] A bitwise combination of flags in
     GRPC::Core::PropagateMasks. Indicates how data should be propagated
     from parent server calls to child client calls if this client is being
     used within a gRPC server.
 @param channel_args [Hash] the channel arguments. Note: this argument is
     ignored if the channel_override argument is provided.
 @param interceptors [Array<GRPC::ClientInterceptor>] An array of
     GRPC::ClientInterceptor objects that will be used for
     intercepting calls before they are executed
     Interceptors are an EXPERIMENTAL API.
 request_response sends a request to a GRPC server, and returns the
 response.

 == Flow Control ==
 This is a blocking call.

 * it does not return until a response is received.

 * the requests is sent only when GRPC core's flow control allows it to
   be sent.

 == Errors ==
 An RuntimeError is raised if

 * the server responds with a non-OK status

 * the deadline is exceeded

 == Return Value ==

 If return_op is false, the call returns the response

 If return_op is true, the call returns an Operation, calling execute
 on the Operation returns the response.

 @param method [String] the RPC method to call on the GRPC server
 @param req [Object] the request sent to the server
 @param marshal [Function] f(obj)->string that marshals requests
 @param unmarshal [Function] f(string)->obj that unmarshals responses
 @param deadline [Time] (optional) the time the request should complete
 @param return_op [true|false] return an Operation if true
 @param parent [Core::Call] a prior call whose reserved metadata
   will be propagated by this one.
 @param credentials [Core::CallCredentials] credentials to use when making
   the call
 @param metadata [Hash] metadata to be sent to the server
 @return [Object] the response received from the server