Struct containers_image_proxy::ImageProxy
source · [−]pub struct ImageProxy { /* private fields */ }Expand description
Manage a child process proxy to fetch container images.
Implementations
sourceimpl ImageProxy
impl ImageProxy
sourcepub async fn new() -> Result<Self>
pub async fn new() -> Result<Self>
Create an image proxy that fetches the target image, using default configuration.
sourcepub async fn new_with_config(config: ImageProxyConfig) -> Result<Self>
pub async fn new_with_config(config: ImageProxyConfig) -> Result<Self>
Create an image proxy that fetches the target image
pub async fn open_image(&self, imgref: &str) -> Result<OpenedImage>
pub async fn close_image(&self, img: &OpenedImage) -> Result<()>
sourcepub async fn fetch_manifest_raw_oci(
&self,
img: &OpenedImage
) -> Result<(String, Vec<u8>)>
pub async fn fetch_manifest_raw_oci(
&self,
img: &OpenedImage
) -> Result<(String, Vec<u8>)>
Fetch the manifest as raw bytes, converted to OCI if necessary. The original digest of the unconverted manifest is also returned. For more information on OCI manifests, see https://github.com/opencontainers/image-spec/blob/main/manifest.md
sourcepub async fn fetch_manifest(
&self,
img: &OpenedImage
) -> Result<(String, ImageManifest)>
pub async fn fetch_manifest(
&self,
img: &OpenedImage
) -> Result<(String, ImageManifest)>
Fetch the manifest. For more information on OCI manifests, see https://github.com/opencontainers/image-spec/blob/main/manifest.md
sourcepub async fn fetch_config_raw(&self, img: &OpenedImage) -> Result<Vec<u8>>
pub async fn fetch_config_raw(&self, img: &OpenedImage) -> Result<Vec<u8>>
Fetch the config. For more information on OCI config, see https://github.com/opencontainers/image-spec/blob/main/config.md
sourcepub async fn fetch_config(
&self,
img: &OpenedImage
) -> Result<ImageConfiguration>
pub async fn fetch_config(
&self,
img: &OpenedImage
) -> Result<ImageConfiguration>
Fetch the config. For more information on OCI config, see https://github.com/opencontainers/image-spec/blob/main/config.md
sourcepub async fn get_blob(
&self,
img: &OpenedImage,
digest: &str,
size: u64
) -> Result<(impl AsyncBufRead + Send + Unpin, impl Future<Output = Result<()>> + Unpin + '_)>
pub async fn get_blob(
&self,
img: &OpenedImage,
digest: &str,
size: u64
) -> Result<(impl AsyncBufRead + Send + Unpin, impl Future<Output = Result<()>> + Unpin + '_)>
Fetch a blob identified by e.g. sha256:<digest>.
https://github.com/opencontainers/image-spec/blob/main/descriptor.md
The requested size and digest are verified (by the proxy process).
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ImageProxy
impl !Send for ImageProxy
impl !Sync for ImageProxy
impl Unpin for ImageProxy
impl !UnwindSafe for ImageProxy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more