[−][src]Struct shipliftExp::Container
Interface for accessing and manipulating a docker container
Methods
impl<'a, 'b> Container<'a, 'b>
[src]
pub fn new<S>(docker: &'a Docker, id: S) -> Container<'a, 'b> where
S: Into<Cow<'b, str>>,
[src]
S: Into<Cow<'b, str>>,
Exports an interface exposing operations against a container instance
pub fn id(&self) -> &str
[src]
a getter for the container id
pub fn inspect(&self) -> impl Future<Item = ContainerDetails, Error = Error>
[src]
Inspects the current docker container instance's details
pub fn top(
&self,
psargs: Option<&str>
) -> impl Future<Item = Top, Error = Error>
[src]
&self,
psargs: Option<&str>
) -> impl Future<Item = Top, Error = Error>
Returns a top
view of information about the container process
pub fn logs(
&self,
opts: &LogsOptions
) -> impl Stream<Item = Chunk, Error = Error>
[src]
&self,
opts: &LogsOptions
) -> impl Stream<Item = Chunk, Error = Error>
Returns a stream of logs emitted but the container instance
pub fn attach(&self) -> impl Future<Item = Multiplexed, Error = Error>
[src]
Attaches to a running container, returning a stream that can be used to interact with the standard IO streams.
pub fn attach_blocking(&self) -> Result<MultiplexedBlocking>
[src]
Attaches to a running container, returning a stream that can be used to interact with the standard IO streams.
pub fn changes(&self) -> impl Future<Item = Vec<Change>, Error = Error>
[src]
Returns a set of changes made to the container instance
pub fn export(&self) -> impl Stream<Item = Vec<u8>, Error = Error>
[src]
Exports the current docker container into a tarball
pub fn stats(&self) -> impl Stream<Item = Stats, Error = Error>
[src]
Returns a stream of stats specific to this container instance
pub fn start(&self) -> impl Future<Item = (), Error = Error>
[src]
Start the container instance
pub fn stop(
&self,
wait: Option<Duration>
) -> impl Future<Item = (), Error = Error>
[src]
&self,
wait: Option<Duration>
) -> impl Future<Item = (), Error = Error>
Stop the container instance
pub fn restart(
&self,
wait: Option<Duration>
) -> impl Future<Item = (), Error = Error>
[src]
&self,
wait: Option<Duration>
) -> impl Future<Item = (), Error = Error>
Restart the container instance
pub fn kill(
&self,
signal: Option<&str>
) -> impl Future<Item = (), Error = Error>
[src]
&self,
signal: Option<&str>
) -> impl Future<Item = (), Error = Error>
Kill the container instance
pub fn rename(&self, name: &str) -> impl Future<Item = (), Error = Error>
[src]
Rename the container instance
pub fn pause(&self) -> impl Future<Item = (), Error = Error>
[src]
Pause the container instance
pub fn unpause(&self) -> impl Future<Item = (), Error = Error>
[src]
Unpause the container instance
pub fn wait(&self) -> impl Future<Item = Exit, Error = Error>
[src]
Wait until the container stops
pub fn delete(&self) -> impl Future<Item = (), Error = Error>
[src]
Delete the container instance
Use remove instead to use the force/v options.
pub fn remove(
&self,
opts: RmContainerOptions
) -> impl Future<Item = (), Error = Error>
[src]
&self,
opts: RmContainerOptions
) -> impl Future<Item = (), Error = Error>
Delete the container instance (todo: force/v)
pub fn exec(
&self,
opts: &ExecContainerOptions
) -> impl Stream<Item = Chunk, Error = Error>
[src]
&self,
opts: &ExecContainerOptions
) -> impl Stream<Item = Chunk, Error = Error>
Exec the specified command in the container
pub fn copy_from(
&self,
path: &Path
) -> impl Stream<Item = Vec<u8>, Error = Error>
[src]
&self,
path: &Path
) -> impl Stream<Item = Vec<u8>, Error = Error>
Copy a file/folder from the container. The resulting stream is a tarball of the extracted files.
If path
is not an absolute path, it is relative to the container’s root directory. The
resource specified by path
must exist. To assert that the resource is expected to be a
directory, path
should end in /
or /
. (assuming a path separator of /
). If path
ends in /.
then this indicates that only the contents of the path directory should be
copied. A symlink is always resolved to its target.
pub fn copy_file_into<P: AsRef<Path>>(
&self,
path: P,
bytes: &[u8]
) -> impl Future<Item = (), Error = Error>
[src]
&self,
path: P,
bytes: &[u8]
) -> impl Future<Item = (), Error = Error>
Copy a byte slice as file into (see bytes
) the container.
The file will be copied at the given location (see path
) and will be owned by root
with access mask 644.
Auto Trait Implementations
impl<'a, 'b> Send for Container<'a, 'b>
impl<'a, 'b> Sync for Container<'a, 'b>
impl<'a, 'b> Unpin for Container<'a, 'b>
impl<'a, 'b> !UnwindSafe for Container<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for Container<'a, 'b>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,