Struct moby::docker::Docker [−][src]
Entrypoint interface for communicating with docker daemon
Implementations
impl Docker
[src]
pub fn new<S>(uri: S) -> Result<Docker> where
S: AsRef<str>,
[src]
S: AsRef<str>,
Creates a new Docker instance by automatically choosing appropriate connection type based
on provided uri
.
Supported schemes are:
unix://
with featureunix-socket
enabled, otherwise returns an Errortcp://
http://
To create a Docker instance utilizing TLS use explicit Docker::tls constructor.
pub fn unix<S>(socket_path: S) -> Docker where
S: Into<String>,
[src]
S: Into<String>,
Creates a new docker instance for a docker host listening on a given Unix socket.
socket_path
is the part of URI that comes after the unix://
. For example a URI unix:///run/docker.sock
has a
socket_path
== “/run/docker.sock”.
pub fn tls<S, P>(host: S, cert_path: P, verify: bool) -> Result<Docker> where
S: Into<String>,
P: AsRef<Path>,
[src]
S: Into<String>,
P: AsRef<Path>,
Creates a new docker instance for a docker host listening on a given TCP socket host
.
host
is the part of URI that comes after tcp://
or http://
or https://
schemes,
also known as authority part.
cert_path
specifies the base path in the filesystem containing a certificate (cert.pem
)
and a key (key.pem
) that will be used by the client. If verify is true
a CA file will be
added (ca.pem
) to the connector.
pub fn tcp<S>(host: S) -> Docker where
S: Into<String>,
[src]
S: Into<String>,
Creates a new docker instance for a docker host listening on a given TCP socket host
.
host
is the part of URI that comes after tcp://
or http://
schemes, also known as
authority part.
TLS is supported with feature tls
enabled through Docker::tls constructor.
pub fn images(&self) -> Images<'_>
[src]
Exports an interface for interacting with docker images
pub fn containers(&self) -> Containers<'_>
[src]
Exports an interface for interacting with docker containers
pub fn services(&self) -> Services<'_>
[src]
Exports an interface for interacting with docker services
pub fn networks(&self) -> Networks<'_>
[src]
pub fn volumes(&self) -> Volumes<'_>
[src]
pub async fn version(&self) -> Result<Version>
[src]
Returns version information associated with the docker daemon
pub async fn info(&self) -> Result<Info>
[src]
Returns information associated with the docker daemon
pub async fn ping(&self) -> Result<String>
[src]
Returns a simple ping response indicating the docker daemon is accessible
pub fn events<'docker>(
&'docker self,
opts: &EventsOptions
) -> impl Stream<Item = Result<Event>> + Unpin + 'docker
[src]
&'docker self,
opts: &EventsOptions
) -> impl Stream<Item = Result<Event>> + Unpin + 'docker
Returns a stream of docker events
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Docker
impl Send for Docker
impl Sync for Docker
impl Unpin for Docker
impl !UnwindSafe for Docker
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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>,