Sha256: a974cbfc3da81d3374c46d4d3f1e1702cd0e4f9961d5b954321f1ca88dd831bd

Contents?: true

Size: 694 Bytes

Versions: 1

Compression:

Stored size: 694 Bytes

Contents

# frozen_string_literal: true

require 'grpc_kit/interceptors'

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grpc_kit-0.1.9 lib/grpc_kit/interceptors/client_server_streamer.rb