atlas_local/models/watch_options.rs
1use tokio::time;
2
3/// Options for waiting for a deployment to become healthy.
4///
5/// This struct provides configuration options for waiting for a container
6/// to reach a healthy state, including setting a maximum timeout duration.
7///
8/// # Examples
9///
10/// ```
11/// use atlas_local::models::WatchOptions;
12/// use std::time::Duration;
13///
14/// let options = WatchOptions::builder()
15/// .timeout_duration(Duration::from_secs(300))
16/// .build();
17/// ```
18#[derive(Debug, Clone, PartialEq, typed_builder::TypedBuilder)]
19#[builder(doc)]
20pub struct WatchOptions {
21 /// Maximum duration to wait for the deployment to become healthy.
22 #[builder(default, setter(strip_option))]
23 pub timeout_duration: Option<time::Duration>,
24
25 /// Indicates that the initial state of the deployment is allowed to be unhealthy.
26 #[builder(default = false)]
27 pub allow_unhealthy_initial_state: bool,
28}