[−][src]Struct bandsocks::RegistryClientBuilder
Builder for configuring custom RegistryClient instances
Implementations
impl RegistryClientBuilder
[src]
pub fn new() -> Self
[src]
Start constructing a custom registry client
pub fn disallow_http(self) -> Self
[src]
Disallow connecting to registries via HTTP
The way Docker parses image names, values like localhost/blah
or
dev:5000/foo
will be interpreted as hosts to contact over unencrypted
HTTP. This setting disallows such registries.
pub fn offline(self) -> Self
[src]
Only use images already in the local cache
pub fn allow_only_connections_to(self, allowed: HashSet<Registry>) -> Self
[src]
Set a list of allowed registry servers
All connections will be checked against this list. The default registry is not automatically added to the list. If no allowed registry list is set, any server will be allowed. An empty allow list will disallow all connections, but the local cache will still be used if available.
pub fn cache_dir(self, dir: &Path) -> Self
[src]
Change the cache directory
This stores local data which has been downloaded and/or decompressed. Files here are read-only after they are created, and may be shared with other trusted processes. The default directory can be determined with RegistryClient::default_cache_dir()
pub fn ephemeral_cache(self) -> Self
[src]
Set a random, disposable cache directory
This is currently equivalent to calling cache_dir() on a randomly generated path in the system temp directory. In the future this setting may enable an entirely in-memory storage backend.
pub fn request_timeout(self, timeout: Duration) -> Self
[src]
Set a timeout for each network request
This timeout applies from the beginning of a (GET) request until the last byte has been received. By default there is no timeout.
pub fn connect_timeout(self, timeout: Duration) -> Self
[src]
Set a timeout for only the initial connect phase of each network request
By default there is no timeout beyond those built into the networking stack.
pub fn user_agent<V>(self, value: V) -> Self where
V: TryInto<HeaderValue>,
V::Error: Into<Error>,
[src]
V: TryInto<HeaderValue>,
V::Error: Into<Error>,
Sets the User-Agent
header used by this client
By default, the value returened by
RegistryClient::default_user_agent() is used, which identifies the
version of bandsocks
acting as a client.
pub fn local_address<T>(self, addr: T) -> Self where
T: Into<Option<IpAddr>>,
[src]
T: Into<Option<IpAddr>>,
Bind to a specific local IP address
pub fn default_request_headers(self, headers: HeaderMap) -> Self
[src]
Set the default headers for every HTTP request
pub fn add_root_certificate(self, certificate: Certificate) -> Self
[src]
Trust an additional root certificate
pub fn registry(self, default_registry: &DefaultRegistry) -> Self
[src]
Change the default registry server
This registry is used for pulling images that do not specify a server. The default value if unset can be determined with RegistryClient::default_registry()
The parameter is a DefaultRegistry, which provides a few additional
options for emulating registry quirks. When those aren't needed,
a Registry can be converted directly into a DefaultRegistry by
calling its into()
.
pub fn login(
self,
registry: Registry,
username: String,
password: Option<String>
) -> Self
[src]
self,
registry: Registry,
username: String,
password: Option<String>
) -> Self
Store a username and password for use with a particular registry on this client
pub fn build(self) -> Result<RegistryClient, ImageError>
[src]
Construct a RegistryClient using the parameters from this Builder
Auto Trait Implementations
impl !RefUnwindSafe for RegistryClientBuilder
impl Send for RegistryClientBuilder
impl Sync for RegistryClientBuilder
impl Unpin for RegistryClientBuilder
impl !UnwindSafe for RegistryClientBuilder
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, 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>,