Sha256: a8eea64c2bca53f5e5982282da6ca8b635a83f14fe1cf67786e74f765771dc27

Contents?: true

Size: 1.35 KB

Versions: 15

Compression:

Stored size: 1.35 KB

Contents

# frozen_string_literal: true

module GrpcKit
  MethodConfig = Struct.new(
    :path,
    :ruby_style_method_name,
    :protobuf,
    :interceptor,
    :service_name,
    :method_name,
    :max_receive_message_size,
    :max_send_message_size,
    :compressor_type,
  ) do
    MAX_SERVER_RECEIVE_MESSAGE_SIZE = 1024 * 1024 * 4
    MAX_SERVER_SEND_MESSAGE_SIZE = 1024 * 1024 * 4
    MAX_CLIENT_RECEIVE_MESSAGE_SIZE = 1024 * 1024 * 4
    MAX_CLIENT_SEND_MESSAGE_SIZE = 1024 * 1024 * 4

    def self.build_for_server(
          path:, ruby_style_method_name:, protobuf:, service_name:, method_name:, interceptor:,
          max_receive_message_size: MAX_SERVER_RECEIVE_MESSAGE_SIZE, max_send_message_size: MAX_SERVER_SEND_MESSAGE_SIZE, compressor_type: ''
        )
      new(path, ruby_style_method_name, protobuf, interceptor, service_name, method_name, max_receive_message_size, max_send_message_size, compressor_type)
    end

    def self.build_for_client(
          path:, ruby_style_method_name:, protobuf:, service_name:, method_name:, interceptor:,
          max_receive_message_size: MAX_CLIENT_RECEIVE_MESSAGE_SIZE, max_send_message_size: MAX_CLIENT_SEND_MESSAGE_SIZE, compressor_type: ''
        )
      new(path, ruby_style_method_name, protobuf, interceptor, service_name, method_name, max_receive_message_size, max_send_message_size, compressor_type)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
grpc_kit-0.2.0 lib/grpc_kit/method_config.rb
grpc_kit-0.1.14 lib/grpc_kit/method_config.rb
grpc_kit-0.1.13 lib/grpc_kit/method_config.rb
grpc_kit-0.1.12 lib/grpc_kit/method_config.rb
grpc_kit-0.1.11 lib/grpc_kit/method_config.rb
grpc_kit-0.1.10 lib/grpc_kit/method_config.rb
grpc_kit-0.1.9 lib/grpc_kit/method_config.rb
grpc_kit-0.1.8 lib/grpc_kit/method_config.rb
grpc_kit-0.1.7 lib/grpc_kit/method_config.rb
grpc_kit-0.1.6 lib/grpc_kit/method_config.rb
grpc_kit-0.1.5 lib/grpc_kit/method_config.rb
grpc_kit-0.1.4 lib/grpc_kit/method_config.rb
grpc_kit-0.1.3 lib/grpc_kit/method_config.rb
grpc_kit-0.1.2 lib/grpc_kit/method_config.rb
grpc_kit-0.1.1 lib/grpc_kit/method_config.rb