pub struct LocalDockerBackend { /* private fields */ }Expand description
Runs a GHA workflow using local Docker containers and the docker CLI.
Implementations§
Source§impl LocalDockerBackend
impl LocalDockerBackend
Sourcepub fn new(
job_runner: &JobRunner,
github_dir: &Path,
stdout_handler: OutputHandler,
stderr_handler: OutputHandler,
) -> Result<LocalDockerBackend>
pub fn new( job_runner: &JobRunner, github_dir: &Path, stdout_handler: OutputHandler, stderr_handler: OutputHandler, ) -> Result<LocalDockerBackend>
Create a new backend for running GHA with local docker containers
Trait Implementations§
Source§impl RunnerBackend for LocalDockerBackend
impl RunnerBackend for LocalDockerBackend
Source§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>>
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”.)Auto Trait Implementations§
impl Freeze for LocalDockerBackend
impl !RefUnwindSafe for LocalDockerBackend
impl !Send for LocalDockerBackend
impl !Sync for LocalDockerBackend
impl Unpin for LocalDockerBackend
impl !UnwindSafe for LocalDockerBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more