pub struct Registry { /* private fields */ }Expand description
OCI registry client with platform resolution, caching, and progress reporting.
Implementations§
Source§impl Registry
impl Registry
Sourcepub fn new(platform: Platform, cache: GlobalCache) -> ImageResult<Self>
pub fn new(platform: Platform, cache: GlobalCache) -> ImageResult<Self>
Create a registry client with anonymous authentication.
Sourcepub fn with_auth(
platform: Platform,
cache: GlobalCache,
auth: RegistryAuth,
) -> ImageResult<Self>
pub fn with_auth( platform: Platform, cache: GlobalCache, auth: RegistryAuth, ) -> ImageResult<Self>
Create a registry client with explicit authentication.
Sourcepub fn pull_cached(
cache: &GlobalCache,
reference: &Reference,
options: &PullOptions,
) -> ImageResult<Option<(PullResult, CachedImageMetadata)>>
pub fn pull_cached( cache: &GlobalCache, reference: &Reference, options: &PullOptions, ) -> ImageResult<Option<(PullResult, CachedImageMetadata)>>
Resolve a pull directly from the on-disk cache without building a registry client.
Sourcepub async fn pull(
&self,
reference: &Reference,
options: &PullOptions,
) -> ImageResult<PullResult>
pub async fn pull( &self, reference: &Reference, options: &PullOptions, ) -> ImageResult<PullResult>
Pull an image. Downloads, extracts, and indexes layers concurrently.
Sourcepub fn pull_with_progress(
&self,
reference: &Reference,
options: &PullOptions,
) -> (PullProgressHandle, JoinHandle<ImageResult<PullResult>>)
pub fn pull_with_progress( &self, reference: &Reference, options: &PullOptions, ) -> (PullProgressHandle, JoinHandle<ImageResult<PullResult>>)
Pull with progress reporting.
Creates a progress channel internally and returns both the receiver handle and the spawned pull task.
Sourcepub fn pull_with_sender(
&self,
reference: &Reference,
options: &PullOptions,
sender: PullProgressSender,
) -> JoinHandle<ImageResult<PullResult>>
pub fn pull_with_sender( &self, reference: &Reference, options: &PullOptions, sender: PullProgressSender, ) -> JoinHandle<ImageResult<PullResult>>
Pull with an externally-provided progress sender.
Use progress_channel() to create the
channel, keep the PullProgressHandle receiver, and pass the
PullProgressSender here.
Auto Trait Implementations§
impl Freeze for Registry
impl !RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl !UnwindSafe for Registry
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