Sha256: bb5ad7696862fdce729e28c171ff02ebabcd34612291ff85416054d2771c4e6f

Contents?: true

Size: 612 Bytes

Versions: 1

Compression:

Stored size: 612 Bytes

Contents

# frozen_string_literal: true

require 'grpc_kit/calls'

module GrpcKit
  module Calls::Client
    class RequestResponse < GrpcKit::Calls::Call
      attr_reader :deadline, :service_name, :method_name
      attr_reader :metadata
      alias outgoing_metadata metadata

      def send_msg(data, timeout: nil, metadata: {}, last: false)
        raise 'No method error' if @restrict

        @stream.send_msg(data, last: last, timeout: timeout, metadata: metadata)
      end

      def recv(last: false)
        raise 'No method error' if @restrict

        @stream.recv_msg(last: last)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grpc_kit-0.1.4 lib/grpc_kit/calls/client_request_response.rb