Skip to main content

ComposeRunner

Trait ComposeRunner 

Source
pub trait ComposeRunner: Send + Sync {
    // Required methods
    fn run<'life0, 'life1, 'async_trait>(
        &'life0 self,
        args: &'life1 [String],
    ) -> Pin<Box<dyn Future<Output = ComposeOutput> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn run_docker<'life0, 'life1, 'async_trait>(
        &'life0 self,
        args: &'life1 [String],
    ) -> Pin<Box<dyn Future<Output = ComposeOutput> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn run_streaming<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        args: &'life1 [String],
        line_sink: &'life2 mut (dyn for<'a> FnMut(&'a str) + Send),
    ) -> Pin<Box<dyn Future<Output = ComposeOutput> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

The process seam for everything rig-related. Actions NEVER spawn processes directly — they script this trait (the GatewayApi precedent), which is what makes the whole family testable without docker.

Required Methods§

Source

fn run<'life0, 'life1, 'async_trait>( &'life0 self, args: &'life1 [String], ) -> Pin<Box<dyn Future<Output = ComposeOutput> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Run docker compose <args…> and capture stdout/stderr/exit.

Source

fn run_docker<'life0, 'life1, 'async_trait>( &'life0 self, args: &'life1 [String], ) -> Pin<Box<dyn Future<Output = ComposeOutput> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Run the PLAIN docker CLI (docker <args…>) — the volume-ls and port-attribution shapes that are NOT compose project ops.

Source

fn run_streaming<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, args: &'life1 [String], line_sink: &'life2 mut (dyn for<'a> FnMut(&'a str) + Send), ) -> Pin<Box<dyn Future<Output = ComposeOutput> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Stream docker compose <args…>: stdout forwards to line_sink LINE-BY-LINE as it arrives (piped stdout — logs -f follow mode), stderr is captured for diagnostics (a failed invocation carries its tail in the error; a successful one’s diagnostics go to OUR stderr via tracing — NEVER the data stream). The returned ComposeOutput carries EMPTY stdout: the lines already went to the sink (fakes replay a preloaded stdout through the sink — the keep-it-simple contract).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§