Sha256: 52efeacbf62ee89c154b4e6ca8a3da34d48ee71b327ac2513524c802d0485444
Contents?: true
Size: 856 Bytes
Versions: 15
Compression:
Stored size: 856 Bytes
Contents
# frozen_string_literal: true require 'grpc_kit/rpcs' require 'grpc_kit/calls/server_client_streamer' module GrpcKit module Rpcs::Server class ClientStreamer < GrpcKit::Rpcs::ServerRpc # @param stream [GrpcKit::Stream::ServerStream] # @param metadata [Hash<String, String>] # @return [void] def invoke(stream, metadata: {}) call = GrpcKit::Calls::Server::ClientStreamer.new( metadata: metadata, config: @config, stream: stream, ) if @config.interceptor @config.interceptor.intercept(call) do |c| resp = @handler.send(@config.ruby_style_method_name, c) c.send_msg(resp) end else resp = @handler.send(@config.ruby_style_method_name, call) call.send_msg(resp) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems