1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use derive_getters::Getters;
use derive_new::new;
use tokio::time::Duration;
#[derive(Debug, Getters)]
pub struct ProwlQueueOptions {
retry_method: RetryMethod,
}
#[derive(Debug)]
pub enum RetryMethod {
Linear(LinearRetry),
}
#[derive(new, Debug, Getters)]
pub struct LinearRetry {
backoff: Duration,
max_retries: Option<usize>,
}
impl ProwlQueueOptions {
pub fn new(retry_method: RetryMethod) -> Self {
Self { retry_method }
}
}