pub struct WaitOpts {
pub timeout: Duration,
pub poll_interval: Duration,
pub stall_grace: Duration,
}Expand description
How long to wait and how often to poll.
Fields§
§timeout: DurationThe client-side deadline.
poll_interval: DurationThe gap between polls.
stall_grace: DurationHow long CREATING is tolerated before the stall probe runs (TRAP-2).
Only meaningful for the image wait; the launch wait has no equivalent, because a launch has no build list to probe.
Implementations§
Source§impl WaitOpts
impl WaitOpts
Sourcepub fn for_launch() -> Self
pub fn for_launch() -> Self
Options for the launch wait: crate::sandbox::DEFAULT_LIFECYCLE_TIMEOUT at
crate::sandbox::LIFECYCLE_POLL_INTERVAL, five minutes at five-second polls.
Sourcepub fn for_lifecycle(timeout: Duration) -> Self
pub fn for_lifecycle(timeout: Duration) -> Self
Options for a lifecycle wait (a launch, suspend, resume or terminate) with the caller’s
deadline: core’s crate::sandbox::LIFECYCLE_POLL_INTERVAL, and no stall probe.
Every surface’s lifecycle wait starts here, so what a lifecycle wait is lives in one
place (#266); a caller that polls at another rate sets poll_interval on the result.
stall_grace is set past any deadline rather than to zero, since a zero grace would
read as “probe immediately”, and a lifecycle transition has no build list to probe
(TRAP-2 is the image build’s).