pub struct FileHealthCheckConfig {
pub uri: String,
pub interval: u32,
pub timeout: u32,
pub healthy_threshold: u32,
pub unhealthy_threshold: u32,
pub expected_status: u32,
pub mode: Option<HealthCheckMode>,
pub accepted_statuses: Vec<String>,
}Fields§
§uri: StringRequest target of the HTTP probe. Defaults to /; ignored in TCP
mode.
interval: u32§timeout: u32§healthy_threshold: u32§unhealthy_threshold: u32§expected_status: u32§mode: Option<HealthCheckMode>Probe mode, parsed in SCREAMING_SNAKE_CASE: "HTTP" (the default)
or "TCP".
accepted_statuses: Vec<String>HTTP mode: statuses that count as healthy, each one of "200",
"200-399", "2xx" or "any" (see parse_http_status_range).
Implementations§
Source§impl FileHealthCheckConfig
impl FileHealthCheckConfig
Sourcepub fn to_proto(&self) -> Result<HealthCheckConfig, &'static str>
pub fn to_proto(&self) -> Result<HealthCheckConfig, &'static str>
Build the proto config, parsing accepted_statuses and running
validate_health_check_config so a bad block is refused at load
time with the cluster it belongs to.
Trait Implementations§
Source§impl Clone for FileHealthCheckConfig
impl Clone for FileHealthCheckConfig
Source§impl Debug for FileHealthCheckConfig
impl Debug for FileHealthCheckConfig
Source§impl<'de> Deserialize<'de> for FileHealthCheckConfig
impl<'de> Deserialize<'de> for FileHealthCheckConfig
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
impl Eq for FileHealthCheckConfig
Source§impl Hash for FileHealthCheckConfig
impl Hash for FileHealthCheckConfig
Source§impl PartialEq for FileHealthCheckConfig
impl PartialEq for FileHealthCheckConfig
Source§impl Serialize for FileHealthCheckConfig
impl Serialize for FileHealthCheckConfig
impl StructuralPartialEq for FileHealthCheckConfig
Auto Trait Implementations§
impl Freeze for FileHealthCheckConfig
impl RefUnwindSafe for FileHealthCheckConfig
impl Send for FileHealthCheckConfig
impl Sync for FileHealthCheckConfig
impl Unpin for FileHealthCheckConfig
impl UnsafeUnpin for FileHealthCheckConfig
impl UnwindSafe for FileHealthCheckConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.