[−][src]Struct bandsocks::RegistryClient
Registry clients can download and store data from an image registry
Each client includes settings like authentication, default server, and a cache storage location. One client can be used to download multiple images from multiple registries.
Implementations
impl RegistryClient
[src]
pub fn new() -> Result<RegistryClient, ImageError>
[src]
Construct a new registry client with default options
pub fn builder() -> RegistryClientBuilder
[src]
Construct a registry client with custom options, via ClientBuilder
pub fn default_user_agent() -> HeaderValue
[src]
Return the default User-Agent
that we use if no other is set
pub fn default_cache_dir() -> Result<PathBuf, ImageError>
[src]
Determine a default per-user cache directory which will be used if an alternate cache directory is not specified.
Typically this returns $HOME/.cache/bandsocks
, but it may return
$XDG_CACHE_HOME/bandsocks
if the per-user cache directory has been
set, and the default cache location can be customized directly via the
$BANDSOCKS_CACHE
environment variable.
pub fn default_registry() -> DefaultRegistry
[src]
Return the default registry server
This is the server used when nothing else has been specified either in ImageName or RegistryClientBuilder.
pub async fn pull<'_, '_>(
&'_ mut self,
image: &'_ ImageName
) -> Result<Arc<Image>, ImageError>
[src]
&'_ mut self,
image: &'_ ImageName
) -> Result<Arc<Image>, ImageError>
Resolve an ImageName into an Image if possible
This will always try to load the image from local cache first without accessing the network. If the image is not already available in cache, it will be downloaded from the indicated registry server. If a content digest is given, it will be verified and the image is only returned if it matches the expected content.
The resulting image is mapped into memory and ready for use in any number of containers.
Trait Implementations
impl Clone for RegistryClient
[src]
pub fn clone(&self) -> RegistryClient
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for RegistryClient
impl Send for RegistryClient
impl Sync for RegistryClient
impl Unpin for RegistryClient
impl !UnwindSafe for RegistryClient
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> 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> Same<T> for T
type Output = T
Should always be Self
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,