Sha256: 86ba17882ebf2a6427590a04d2b142051d1d1d67b92157cf1b5d1a5cea044ec1

Contents?: true

Size: 790 Bytes

Versions: 2

Compression:

Stored size: 790 Bytes

Contents

# frozen_string_literal: true

require 'grpc_kit/interceptors/streaming'

module GrpcKit
  module Interceptors
    module Client
      class ClientStreamer < Streaming
        private

        def invoke(interceptor, call)
          # 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: nil) do |s|
            yield(s)
          end
        end
      end
    end

    module Server
      class ClientStreamer < Streaming
        def invoke(interceptor, call)
          interceptor.client_streamer(call: call, method: call.method) do |s|
            yield(s)
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
grpc_kit-0.1.2 lib/grpc_kit/interceptors/client_streamer.rb
grpc_kit-0.1.1 lib/grpc_kit/interceptors/client_streamer.rb