Class: Google::Gax::CallOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/google/gax.rb

Overview

Encapsulates the overridable settings for a particular API call

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(timeout: :OPTION_INHERIT, retry_options: :OPTION_INHERIT, is_page_streaming: :OPTION_INHERIT) ⇒ CallOptions

Returns a new instance of CallOptions.

Parameters:

  • timeout (Numeric, :OPTION_INHERIT) (defaults to: :OPTION_INHERIT)

    The client-side timeout for API calls.

  • retry_options (RetryOptions, :OPTION_INHERIT) (defaults to: :OPTION_INHERIT)

    The configuration for retrying upon transient error. If set to nil, this call will not retry.

  • is_page_streaming (true, false, :OPTION_INHERIT) (defaults to: :OPTION_INHERIT)

    If set and the call is configured for page streaming, page streaming is performed.



136
137
138
139
140
141
142
143
# File 'lib/google/gax.rb', line 136

def initialize(
  timeout: :OPTION_INHERIT,
  retry_options: :OPTION_INHERIT,
  is_page_streaming: :OPTION_INHERIT)
  @timeout = timeout
  @retry_options = retry_options
  @is_page_streaming = is_page_streaming
end

Instance Attribute Details

#is_page_streamingtrue, ... (readonly)

Returns:

  • (true, false, :OPTION_INHERIT)


125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/google/gax.rb', line 125

class CallOptions
  attr_reader :timeout, :retry_options, :is_page_streaming

  # @param timeout [Numeric, :OPTION_INHERIT]
  #   The client-side timeout for API calls.
  # @param retry_options [RetryOptions, :OPTION_INHERIT]
  #   The configuration for retrying upon transient error.
  #   If set to nil, this call will not retry.
  # @param is_page_streaming [true, false, :OPTION_INHERIT]
  #   If set and the call is configured for page streaming, page streaming
  #   is performed.
  def initialize(
    timeout: :OPTION_INHERIT,
    retry_options: :OPTION_INHERIT,
    is_page_streaming: :OPTION_INHERIT)
    @timeout = timeout
    @retry_options = retry_options
    @is_page_streaming = is_page_streaming
  end
end

#retry_optionsRetryOptions, :OPTION_INHERIT (readonly)

Returns:



125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/google/gax.rb', line 125

class CallOptions
  attr_reader :timeout, :retry_options, :is_page_streaming

  # @param timeout [Numeric, :OPTION_INHERIT]
  #   The client-side timeout for API calls.
  # @param retry_options [RetryOptions, :OPTION_INHERIT]
  #   The configuration for retrying upon transient error.
  #   If set to nil, this call will not retry.
  # @param is_page_streaming [true, false, :OPTION_INHERIT]
  #   If set and the call is configured for page streaming, page streaming
  #   is performed.
  def initialize(
    timeout: :OPTION_INHERIT,
    retry_options: :OPTION_INHERIT,
    is_page_streaming: :OPTION_INHERIT)
    @timeout = timeout
    @retry_options = retry_options
    @is_page_streaming = is_page_streaming
  end
end

#timeoutNumeric, :OPTION_INHERIT (readonly)

Returns:

  • (Numeric, :OPTION_INHERIT)


125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/google/gax.rb', line 125

class CallOptions
  attr_reader :timeout, :retry_options, :is_page_streaming

  # @param timeout [Numeric, :OPTION_INHERIT]
  #   The client-side timeout for API calls.
  # @param retry_options [RetryOptions, :OPTION_INHERIT]
  #   The configuration for retrying upon transient error.
  #   If set to nil, this call will not retry.
  # @param is_page_streaming [true, false, :OPTION_INHERIT]
  #   If set and the call is configured for page streaming, page streaming
  #   is performed.
  def initialize(
    timeout: :OPTION_INHERIT,
    retry_options: :OPTION_INHERIT,
    is_page_streaming: :OPTION_INHERIT)
    @timeout = timeout
    @retry_options = retry_options
    @is_page_streaming = is_page_streaming
  end
end