Class: GrpcKit::MethodConfig

Inherits:
Struct
  • Object
show all
Defined in:
lib/grpc_kit/method_config.rb

Constant Summary collapse

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#compressor_typeObject

Returns the value of attribute compressor_type


4
5
6
# File 'lib/grpc_kit/method_config.rb', line 4

def compressor_type
  @compressor_type
end

#interceptorObject

Returns the value of attribute interceptor


4
5
6
# File 'lib/grpc_kit/method_config.rb', line 4

def interceptor
  @interceptor
end

#max_receive_message_sizeObject

Returns the value of attribute max_receive_message_size


4
5
6
# File 'lib/grpc_kit/method_config.rb', line 4

def max_receive_message_size
  @max_receive_message_size
end

#max_send_message_sizeObject

Returns the value of attribute max_send_message_size


4
5
6
# File 'lib/grpc_kit/method_config.rb', line 4

def max_send_message_size
  @max_send_message_size
end

#method_nameObject

Returns the value of attribute method_name


4
5
6
# File 'lib/grpc_kit/method_config.rb', line 4

def method_name
  @method_name
end

#pathObject

Returns the value of attribute path


4
5
6
# File 'lib/grpc_kit/method_config.rb', line 4

def path
  @path
end

#protobufObject

Returns the value of attribute protobuf


4
5
6
# File 'lib/grpc_kit/method_config.rb', line 4

def protobuf
  @protobuf
end

#ruby_style_method_nameObject

Returns the value of attribute ruby_style_method_name


4
5
6
# File 'lib/grpc_kit/method_config.rb', line 4

def ruby_style_method_name
  @ruby_style_method_name
end

#service_nameObject

Returns the value of attribute service_name


4
5
6
# File 'lib/grpc_kit/method_config.rb', line 4

def service_name
  @service_name
end

Class Method Details

.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: '') ⇒ Object


27
28
29
30
31
32
# File 'lib/grpc_kit/method_config.rb', line 27

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

.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: '') ⇒ Object


20
21
22
23
24
25
# File 'lib/grpc_kit/method_config.rb', line 20

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