[][src]Struct bandsocks::RegistryClient

pub struct RegistryClient { /* fields omitted */ }

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]

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]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,