gapic-common - Class Gapic::CallOptions (v0.24.0)

Reference documentation and code samples for the gapic-common class Gapic::CallOptions.

Encapsulates the overridable settings for a particular RPC call.

Inherits

  • Object

Methods

#initialize

  def 
  
 initialize 
 ( 
 timeout 
 : 
  
 nil 
 , 
  
 metadata 
 : 
  
 nil 
 , 
  
 retry_policy 
 : 
  
 nil 
 ) 
  
 - 
>  
 CallOptions 
 

Create a new Options object instance.

Parameters
  • timeout(Numeric) (defaults to: nil) — The client-side timeout for RPC calls.
  • metadata(Hash) (defaults to: nil) — The request header params.
  • retry_policy(Hash, RetryPolicy , Proc) (defaults to: nil) — The policy for error retry. A Hash can be provided to customize the policy object, using keys that match the arguments for RetryPolicy#initialize .

    A Proc object can also be provided. The Proc should accept an error as an argument, and return true if the error should be retried or false if not. If the error is to be retried, the Proc object must also block with an incremental delay before returning true .

Returns

#merge

  def 
  
 merge 
 ( 
 ** 
 kwargs 
 ) 
  
 - 
>  
 CallOptions 
 

Return a new CallOptions with the given modifications. The current object is not modified.

Parameter
  • kwargs(keywords) — Updated fields. See #initialize for details.
Returns
  def 
  
 metadata 
 () 
  
 - 
>  
 Hash 
 
Returns
  • (Hash)

#retry_policy

  def 
  
 retry_policy 
 () 
  
 - 
>  
 RetryPolicy 
 , 
  
 Object 
 
Returns

#timeout

  def 
  
 timeout 
 () 
  
 - 
>  
 Numeric 
 , 
  
 nil 
 
Returns
  • (Numeric, nil)

#to_h

  def 
  
 to_h 
 () 
  
 - 
>  
 Hash 
 

Convert to hash form.

Returns
  • (Hash)
Create a Mobile Website
View Site in Mobile | Classic
Share by: