Class: Google::Apis::NetworkservicesV1::HttpRouteRetryPolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/networkservices_v1/classes.rb,
lib/google/apis/networkservices_v1/representations.rb,
lib/google/apis/networkservices_v1/representations.rb

Overview

The specifications for retries.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HttpRouteRetryPolicy

Returns a new instance of HttpRouteRetryPolicy.



1867
1868
1869
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1867

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#num_retriesFixnum

Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1. Corresponds to the JSON property numRetries

Returns:

  • (Fixnum)


1844
1845
1846
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1844

def num_retries
  @num_retries
end

#per_try_timeoutString

Specifies a non-zero timeout per retry attempt. Corresponds to the JSON property perTryTimeout

Returns:

  • (String)


1849
1850
1851
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1849

def per_try_timeout
  @per_try_timeout
end

#retry_conditionsArray<String>

Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504. reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout) connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts. retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. Corresponds to the JSON property retryConditions

Returns:

  • (Array<String>)


1865
1866
1867
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1865

def retry_conditions
  @retry_conditions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1872
1873
1874
1875
1876
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1872

def update!(**args)
  @num_retries = args[:num_retries] if args.key?(:num_retries)
  @per_try_timeout = args[:per_try_timeout] if args.key?(:per_try_timeout)
  @retry_conditions = args[:retry_conditions] if args.key?(:retry_conditions)
end