windmill_api/models/retry_exponential.rs
1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.828.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// RetryExponential : Retry with exponential backoff: the n-th retry waits multiplier × seconds^n
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RetryExponential {
17 /// Number of retry attempts
18 #[serde(rename = "attempts", skip_serializing_if = "Option::is_none")]
19 pub attempts: Option<i32>,
20 /// Multiplier for exponential backoff
21 #[serde(rename = "multiplier", skip_serializing_if = "Option::is_none")]
22 pub multiplier: Option<i32>,
23 /// Base of the exponential (seconds); the n-th retry waits multiplier × seconds^n, where n counts constant retries too
24 #[serde(rename = "seconds", skip_serializing_if = "Option::is_none")]
25 pub seconds: Option<i32>,
26 /// Random jitter percentage (0-100) to avoid thundering herd
27 #[serde(rename = "random_factor", skip_serializing_if = "Option::is_none")]
28 pub random_factor: Option<i32>,
29}
30
31impl RetryExponential {
32 /// Retry with exponential backoff: the n-th retry waits multiplier × seconds^n
33 pub fn new() -> RetryExponential {
34 RetryExponential {
35 attempts: None,
36 multiplier: None,
37 seconds: None,
38 random_factor: None,
39 }
40 }
41}
42