pub struct RunningDockerExecutor {
pub container_id: String,
pub host_port: String,
/* private fields */
}
Fields§
§container_id: String
§host_port: String
Implementations§
Source§impl RunningDockerExecutor
impl RunningDockerExecutor
Sourcepub async fn start(
container_uuid: Uuid,
context_path: &Path,
dockerfile: Option<&Path>,
image_name: &str,
user: Option<&str>,
) -> Result<RunningDockerExecutor, DockerExecutorError>
pub async fn start( container_uuid: Uuid, context_path: &Path, dockerfile: Option<&Path>, image_name: &str, user: Option<&str>, ) -> Result<RunningDockerExecutor, DockerExecutorError>
Starts a docker container with a given context and image name
Sourcepub async fn container_state(
&self,
) -> Result<ContainerState, DockerExecutorError>
pub async fn container_state( &self, ) -> Result<ContainerState, DockerExecutorError>
Returns the underlying bollard status of the container
Useful for checking if the executor is running or not
Sourcepub async fn is_running(&self) -> bool
pub async fn is_running(&self) -> bool
Check if the executor and its underlying container is running
Will ignore any errors and assume it is not if there are
Source§impl RunningDockerExecutor
impl RunningDockerExecutor
Sourcepub fn into_file_loader<V: IntoIterator<Item = T>, T: Into<String>>(
self,
path: impl Into<PathBuf>,
extensions: V,
) -> FileLoader<'static>
pub fn into_file_loader<V: IntoIterator<Item = T>, T: Into<String>>( self, path: impl Into<PathBuf>, extensions: V, ) -> FileLoader<'static>
Creates an owned file loader from the executor. If needed it is safe to clone the executor.
The loader can be used with a swiftide indexing pipeline.
Sourcepub fn as_file_loader<'a, V: IntoIterator<Item = T>, T: Into<String>>(
&'a self,
path: impl Into<PathBuf>,
extensions: V,
) -> FileLoader<'a>
pub fn as_file_loader<'a, V: IntoIterator<Item = T>, T: Into<String>>( &'a self, path: impl Into<PathBuf>, extensions: V, ) -> FileLoader<'a>
Creates a borrowed file loader from the executor.
Trait Implementations§
Source§impl Clone for RunningDockerExecutor
impl Clone for RunningDockerExecutor
Source§fn clone(&self) -> RunningDockerExecutor
fn clone(&self) -> RunningDockerExecutor
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RunningDockerExecutor
impl Debug for RunningDockerExecutor
Source§impl Drop for RunningDockerExecutor
impl Drop for RunningDockerExecutor
Source§impl From<RunningDockerExecutor> for Arc<dyn ToolExecutor>
impl From<RunningDockerExecutor> for Arc<dyn ToolExecutor>
Source§fn from(val: RunningDockerExecutor) -> Self
fn from(val: RunningDockerExecutor) -> Self
Converts to this type from the input type.
Source§impl ToolExecutor for RunningDockerExecutor
impl ToolExecutor for RunningDockerExecutor
Source§fn exec_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 Command,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput, CommandError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn exec_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 Command,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput, CommandError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a command in the executor
Source§fn stream_files<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
extensions: Option<Vec<String>>,
) -> Pin<Box<dyn Future<Output = Result<IndexingStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stream_files<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
extensions: Option<Vec<String>>,
) -> Pin<Box<dyn Future<Output = Result<IndexingStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stream files from the executor
Auto Trait Implementations§
impl Freeze for RunningDockerExecutor
impl !RefUnwindSafe for RunningDockerExecutor
impl Send for RunningDockerExecutor
impl Sync for RunningDockerExecutor
impl Unpin for RunningDockerExecutor
impl !UnwindSafe for RunningDockerExecutor
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request