Class: Google::Apis::NetworkservicesV1::HttpRouteRetryPolicy
- Inherits:
-
Object
- Object
- Google::Apis::NetworkservicesV1::HttpRouteRetryPolicy
- 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
-
#num_retries ⇒ Fixnum
Specifies the allowed number of retries.
-
#per_try_timeout ⇒ String
Specifies a non-zero timeout per retry attempt.
-
#retry_conditions ⇒ Array<String>
Specifies one or more conditions when this retry policy applies.
Instance Method Summary collapse
-
#initialize(**args) ⇒ HttpRouteRetryPolicy
constructor
A new instance of HttpRouteRetryPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
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_retries ⇒ Fixnum
Specifies the allowed number of retries. This number must be > 0. If not
specified, default to 1.
Corresponds to the JSON property numRetries
1844 1845 1846 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1844 def num_retries @num_retries end |
#per_try_timeout ⇒ String
Specifies a non-zero timeout per retry attempt.
Corresponds to the JSON property perTryTimeout
1849 1850 1851 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1849 def per_try_timeout @per_try_timeout end |
#retry_conditions ⇒ Array<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
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 |