Skip to main content

Module command_executor

Module command_executor 

Source
Expand description

Generic async process runner used by the pg_ctl and initdb wrappers.

The core abstraction is AsyncCommand, a trait with two methods: AsyncCommand::new spawns the OS process and AsyncCommand::execute waits for it to finish (with an optional timeout).

ProcessStatus is a companion trait that maps a process type (initdb, start, stop) to the status values and errors it should produce.

The only concrete implementation is AsyncCommandExecutor.

Structs§

AsyncCommandExecutor
Concrete implementation of AsyncCommand built on tokio::process.
LogOutputData
A single log line captured from a child process stream.

Enums§

LogType
Indicates whether a log line came from stdout or stderr.

Traits§

AsyncCommand
Trait for types that can spawn and execute an OS process asynchronously.
ProcessStatus
Maps a process type to the status values and errors it should produce.