Struct nydus_api::config::MirrorConfig
source · pub struct MirrorConfig {
pub host: String,
pub ping_url: String,
pub headers: HashMap<String, String>,
pub auth_through: bool,
pub health_check_interval: u64,
pub failure_limit: u8,
}Expand description
Configuration for registry mirror.
Fields§
§host: StringMirror server URL, for example http://127.0.0.1:65001.
ping_url: StringPing URL to check mirror server health.
headers: HashMap<String, String>HTTP request headers to be passed to mirror server.
auth_through: boolWhether the authorization process is through mirror, default to false. true: authorization through mirror, e.g. Using normal registry as mirror. false: authorization through original registry, e.g. when using Dragonfly server as mirror, authorization through it may affect performance.
health_check_interval: u64Interval for mirror health checking, in seconds.
failure_limit: u8Maximum number of failures before marking a mirror as unusable.
Trait Implementations§
source§impl Clone for MirrorConfig
impl Clone for MirrorConfig
source§fn clone(&self) -> MirrorConfig
fn clone(&self) -> MirrorConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for MirrorConfig
impl Debug for MirrorConfig
source§impl Default for MirrorConfig
impl Default for MirrorConfig
source§impl<'de> Deserialize<'de> for MirrorConfig
impl<'de> Deserialize<'de> for MirrorConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<MirrorConfig> for MirrorConfig
impl PartialEq<MirrorConfig> for MirrorConfig
source§fn eq(&self, other: &MirrorConfig) -> bool
fn eq(&self, other: &MirrorConfig) -> bool
This method tests for
self and other values to be equal, and is used
by ==.