Sha256: 681bbc140b4770ed716309273c8a4e7a00e984d6a75686226d8de8a003ec6be6

Contents?: true

Size: 667 Bytes

Versions: 4

Compression:

Stored size: 667 Bytes

Contents

# frozen_string_literal: true

require 'grpc_kit/rpcs'
require 'grpc_kit/calls/client_server_streamer'

module GrpcKit
  module Rpcs::Client
    class ServerStreamer < GrpcKit::Rpcs::ClientRpc
      def invoke(stream, request, metadata: {}, timeout: nil)
        call = GrpcKit::Calls::Client::ServerStreamer.new(metadata: metadata, config: @config, timeout: timeout, stream: stream)

        if @config.interceptor
          @config.interceptor.intercept(call, metadata) do |c, m|
            c.send_msg(request, last: true)
            c
          end
        else
          call.send_msg(request, last: true)
          call
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
grpc_kit-0.1.8 lib/grpc_kit/rpcs/client_server_streamer.rb
grpc_kit-0.1.7 lib/grpc_kit/rpcs/client_server_streamer.rb
grpc_kit-0.1.6 lib/grpc_kit/rpcs/client_server_streamer.rb
grpc_kit-0.1.5 lib/grpc_kit/rpcs/client_server_streamer.rb