Sha256: 76949a1fec594a8332b19244d0c290de791935c59b5102c65d5b13ef152eb1fb
Contents?: true
Size: 916 Bytes
Versions: 6
Compression:
Stored size: 916 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 # @param stream [GrpcKit::Stream::ClientStream] # @param request [Object] reqeust message # @param metadata [Hash<String, String>] # @param timeout [GrpcKit::GrpcTime] # @return [GrpcKit::Calls::Client::ServerStreamer] 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
6 entries across 6 versions & 1 rubygems