pub trait RunnerBackend {
// Required method
fn run<'a, F: FnMut(&[u8])>(
&'a mut self,
container: ContainerId,
command: &'a str,
stdout_filter: &'a mut F,
) -> Pin<Box<dyn Future<Output = i32> + 'a>>;
}Expand description
A backend that can run tasks in containers.
Required Methods§
Sourcefn run<'a, F: FnMut(&[u8])>(
&'a mut self,
container: ContainerId,
command: &'a str,
stdout_filter: &'a mut F,
) -> Pin<Box<dyn Future<Output = i32> + 'a>>
fn run<'a, F: FnMut(&[u8])>( &'a mut self, container: ContainerId, command: &'a str, stdout_filter: &'a mut F, ) -> Pin<Box<dyn Future<Output = i32> + 'a>>
Run a command in the context of the container, returning its exit code.
There are no parameters, environment variables etc — we emit script files
into the shared filesystem that set those up.
container is an index into the container_images() array.
command is the path to the command inside the container, starting with
“/github”.
stdout_filter is a callback that gets invoked for each chunk of data
emitted to the command’s stdout. (We use this to process
“workflow commands”.)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.