Class: Google::Apis::NetworkservicesV1beta1::HttpRouteRetryPolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/networkservices_v1beta1/classes.rb,
lib/google/apis/networkservices_v1beta1/representations.rb,
lib/google/apis/networkservices_v1beta1/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.



1792
1793
1794
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1792

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)


1769
1770
1771
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1769

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)


1774
1775
1776
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1774

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>)


1790
1791
1792
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1790

def retry_conditions
  @retry_conditions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1797
1798
1799
1800
1801
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1797

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