pub struct HttpRetryPolicy {
pub http_retry_events: Option<Vec<String>>,
pub max_retries: i64,
pub per_retry_timeout: Duration,
pub tcp_retry_events: Option<Vec<String>>,
}
Expand description
An object that represents a retry policy. Specify at least one value for at least one of the types of RetryEvents
, a value for maxRetries
, and a value for perRetryTimeout
.
Fields§
§http_retry_events: Option<Vec<String>>
Specify at least one of the following values.
<ul>
<li>
<p>
<b>server-error</b> – HTTP status codes 500, 501,
502, 503, 504, 505, 506, 507, 508, 510, and 511</p>
</li>
<li>
<p>
<b>gateway-error</b> – HTTP status codes 502,
503, and 504</p>
</li>
<li>
<p>
<b>client-error</b> – HTTP status code 409</p>
</li>
<li>
<p>
<b>stream-error</b> – Retry on refused
stream</p>
</li>
</ul>
max_retries: i64
The maximum number of retry attempts.
per_retry_timeout: Duration
An object that represents a duration of time.
tcp_retry_events: Option<Vec<String>>
Specify a valid value.
Trait Implementations§
Source§impl Clone for HttpRetryPolicy
impl Clone for HttpRetryPolicy
Source§fn clone(&self) -> HttpRetryPolicy
fn clone(&self) -> HttpRetryPolicy
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HttpRetryPolicy
impl Debug for HttpRetryPolicy
Source§impl Default for HttpRetryPolicy
impl Default for HttpRetryPolicy
Source§fn default() -> HttpRetryPolicy
fn default() -> HttpRetryPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HttpRetryPolicy
impl<'de> Deserialize<'de> for HttpRetryPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HttpRetryPolicy
impl PartialEq for HttpRetryPolicy
Source§impl Serialize for HttpRetryPolicy
impl Serialize for HttpRetryPolicy
impl StructuralPartialEq for HttpRetryPolicy
Auto Trait Implementations§
impl Freeze for HttpRetryPolicy
impl RefUnwindSafe for HttpRetryPolicy
impl Send for HttpRetryPolicy
impl Sync for HttpRetryPolicy
impl Unpin for HttpRetryPolicy
impl UnwindSafe for HttpRetryPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more