class Gapic::GrpcServiceConfig::MethodConfig
Method config represents a combination of a timeout and a retry policy, both of which can be optional It is applied during a GRPC method call and governs the client-side timeout/retry policy
Attributes
retry_policy[R]
timeout_seconds[R]
Public Class Methods
new(timeout_seconds, retry_policy)
click to toggle source
Create new MethodConfig
@param timeout_seconds
[Float, nil] the value of timeout in seconds if provided @param retry_policy
[Gapic::GrpcServiceConfig::RetryPolicy] the retry policy
# File lib/gapic/grpc_service_config/method_config.rb, line 35 def initialize timeout_seconds, retry_policy @timeout_seconds = timeout_seconds @retry_policy = retry_policy end
Public Instance Methods
empty?()
click to toggle source
Returns whether MethodConfig
is empty (does not contain any values)
@return [Boolean] whether MethodConfig
is empty
# File lib/gapic/grpc_service_config/method_config.rb, line 45 def empty? @timeout_seconds.nil? && @retry_policy.empty? end