gapic-common - Class Gapic::Config::Method (v0.26.0)

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

Config::Method is a configuration class that represents the configuration for an API RPC call.

Inherits

  • Object

Extended By

Example

 require 
  
 "gapic/config" 
 class 
  
 ServiceConfig 
  
 extend 
  
 Gapic 
 :: 
 Config 
  
 config_attr 
  
 :host 
 , 
  
 "localhost" 
 , 
  
 String 
  
 config_attr 
  
 :port 
 , 
  
 443 
 , 
  
 Integer 
  
 config_attr 
  
 :timeout 
 , 
  
 nil 
 , 
  
 Numeric 
 , 
  
 nil 
  
 config_attr 
  
 :metadata 
 , 
  
 nil 
 , 
  
 Hash 
 , 
  
 nil 
  
 attr_reader 
  
 :rpc_method 
  
 def 
  
 initialize 
  
 parent_config 
  
 = 
  
 nil 
  
 @parent_config 
  
 = 
  
 parent_config 
  
 unless 
  
 parent_config 
 . 
 nil? 
  
 @rpc_method 
  
 = 
  
 Gapic 
 :: 
 Config 
 :: 
 Method 
 . 
 new 
  
 yield 
  
 self 
  
 if 
  
 block_given? 
  
 end 
 end 
 config 
  
 = 
  
 ServiceConfig 
 . 
 new 
 config 
 . 
 timeout 
  
 = 
  
 60 
 config 
 . 
 rpc_method 
 . 
 timeout 
  
 = 
  
 120 

Methods

#initialize

  def 
  
 initialize 
 ( 
 parent_method 
  
 = 
  
 nil 
 ) 
  
 { 
  
 | 
 _self 
 | 
  
 ... 
  
 } 
  
 - 
>  
 Method 
 

Create a new Config::Method object instance.

Parameter
Yields
  • (_self)
Yield Parameter
Returns
  • ( Method ) — a new instance of Method
Create a Mobile Website
View Site in Mobile | Classic
Share by: