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.



2060
2061
2062
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2060

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)


2037
2038
2039
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2037

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)


2042
2043
2044
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2042

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


2058
2059
2060
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2058

def retry_conditions
  @retry_conditions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2065
2066
2067
2068
2069
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2065

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