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>,
pub port: Option<u32>,
pub headers: Vec<FileHealthCheckHeader>,
}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).
port: Option<u32>Port the probe dials on the backend’s IP address, in 1..=65535.
Unset probes the backend’s data port.
headers: Vec<FileHealthCheckHeader>Extra request header fields of the HTTP probe, as an ordered array of
{ name, value_file } tables. A value is never written in the
configuration: value_file names the file the value is read from when
the probe is set up, and parsing never opens it.
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.
Sourcepub fn to_parts(
&self,
) -> Result<(HealthCheckConfig, Vec<FileHealthCheckHeader>), &'static str>
pub fn to_parts( &self, ) -> Result<(HealthCheckConfig, Vec<FileHealthCheckHeader>), &'static str>
The health check as metadata plus the ordered value_file references
of its headers. The metadata names the headers and leaves every
fingerprint empty; names are validated, the files are not touched.
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>,
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
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
key and return true if they are equal.