pub struct SystemProcesses { /* private fields */ }Expand description
Starts real processes. SystemProcesses::default reads the Docker CLI’s config
($DOCKER_CONFIG/config.json, else ~/.docker/config.json) to learn whether the user picked
an engine context of their own.
A tool cut short (its operation’s future dropped: a cancel, a step’s timeout) is asked to stop
(SIGINT to its process group on Unix, Ctrl-C on its console on Windows, so Terraform saves its
state) and ended once it has exited, or 30 seconds later. Its clones share the tools
stopping: a process about to exit waits for them with SystemProcesses::stopped.
Implementations§
Source§impl SystemProcesses
impl SystemProcesses
Sourcepub fn is_stopping(&self) -> bool
pub fn is_stopping(&self) -> bool
Whether a tool cut short is still stopping.
Sourcepub async fn stopped(&self)
pub async fn stopped(&self)
Once every tool cut short has ended: at the latest 30 seconds after the last was cut short. At once when none is stopping.
Sourcepub fn end_stopping(&self)
pub fn end_stopping(&self)
Ends every tool cut short that is still stopping, at once (a second Ctrl-C).
Sourcepub fn end_all_now(&self)
pub fn end_all_now(&self)
Ends every tool running now and every one still stopping, at once: for an embedder about to
exit, whose futures are never dropped (a status read’s docker compose ps would outlive it).
Trait Implementations§
Source§impl Clone for SystemProcesses
impl Clone for SystemProcesses
Source§impl Debug for SystemProcesses
impl Debug for SystemProcesses
Source§impl Default for SystemProcesses
impl Default for SystemProcesses
Source§fn default() -> SystemProcesses
fn default() -> SystemProcesses
Source§impl ProcessRunner for SystemProcesses
impl ProcessRunner for SystemProcesses
Source§fn run<'a>(
&'a self,
spec: &'a ProcessSpec,
on_line: OnLine<'a>,
) -> BoxFuture<'a, Result<Exit, ProcessError>>
fn run<'a>( &'a self, spec: &'a ProcessSpec, on_line: OnLine<'a>, ) -> BoxFuture<'a, Result<Exit, ProcessError>>
spec to its end, handing each line it prints to on_line (decoded lossily).