herolib_virt/nerdctl/
health_check.rs1use super::container_types::HealthCheck;
4
5impl HealthCheck {
6 pub fn new(cmd: &str) -> Self {
8 Self {
9 cmd: cmd.to_string(),
10 interval: None,
11 timeout: None,
12 retries: None,
13 start_period: None,
14 }
15 }
16
17 pub fn with_interval(mut self, interval: &str) -> Self {
19 self.interval = Some(interval.to_string());
20 self
21 }
22
23 pub fn with_timeout(mut self, timeout: &str) -> Self {
25 self.timeout = Some(timeout.to_string());
26 self
27 }
28
29 pub fn with_retries(mut self, retries: u32) -> Self {
31 self.retries = Some(retries);
32 self
33 }
34
35 pub fn with_start_period(mut self, start_period: &str) -> Self {
37 self.start_period = Some(start_period.to_string());
38 self
39 }
40}