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.



1887
1888
1889
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1887

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)


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

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)


1869
1870
1871
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1869

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


1885
1886
1887
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1885

def retry_conditions
  @retry_conditions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1892
1893
1894
1895
1896
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1892

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