Sha256: 2b55808f7ebfe249b1b7b2498d47e00dcefc360fa2f9cced3b422bb09882f484

Contents?: true

Size: 725 Bytes

Versions: 6

Compression:

Stored size: 725 Bytes

Contents

# frozen_string_literal: true

require 'grpc_kit/interceptors'

module GrpcKit
  module Interceptors::Client
    class ClientStreamer < Streaming
      private

      # @param interceptor [GrpcKit::GRPC::ClientInterceptor]
      # @param call [GrpcKit::Calls::Client::ClientStreamer]
      # @param metadata [Hash<String,String>]
      def invoke(interceptor, call, metadata)
        # We don't need a `:requests` parameter but,
        # it shuoldn't remove from paramters due to having a compatibility of grpc gem.
        interceptor.client_streamer(requests: nil, call: call, method: call.method, metadata: metadata) do |new_call = nil|
          yield(new_call || call, metadata)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
grpc_kit-0.2.0 lib/grpc_kit/interceptors/client_client_streamer.rb
grpc_kit-0.1.14 lib/grpc_kit/interceptors/client_client_streamer.rb
grpc_kit-0.1.13 lib/grpc_kit/interceptors/client_client_streamer.rb
grpc_kit-0.1.12 lib/grpc_kit/interceptors/client_client_streamer.rb
grpc_kit-0.1.11 lib/grpc_kit/interceptors/client_client_streamer.rb
grpc_kit-0.1.10 lib/grpc_kit/interceptors/client_client_streamer.rb