pub struct Probe<T = String> {
pub request: Request<T>,
pub timeout: Duration,
pub interval: Duration,
pub exp_status: c_uint,
pub window: c_uint,
pub threshold: c_uint,
pub initial: c_uint,
}Expand description
A backend health check probe definition.
Describes how frequently Varnish polls a backend and what constitutes a healthy response. Pass this to the backend constructor; Varnish owns the actual probing loop.
Fields§
§request: Request<T>The request to send on each probe attempt.
timeout: DurationHow long to wait for a response before considering the probe failed.
interval: DurationHow often to send probe requests.
exp_status: c_uintThe HTTP status code considered healthy (e.g. 200). 0 means any 2xx status.
window: c_uintNumber of most recent probes to consider when evaluating health (sliding window size).
threshold: c_uintMinimum number of successful probes within window to consider the backend healthy.
initial: c_uintNumber of probes that are assumed successful when the backend starts up.
Implementations§
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Probe<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Probe<T>where
T: Deserialize<'de>,
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
Auto Trait Implementations§
impl<T> Freeze for Probe<T>where
T: Freeze,
impl<T> RefUnwindSafe for Probe<T>where
T: RefUnwindSafe,
impl<T> Send for Probe<T>where
T: Send,
impl<T> Sync for Probe<T>where
T: Sync,
impl<T> Unpin for Probe<T>where
T: Unpin,
impl<T> UnsafeUnpin for Probe<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Probe<T>where
T: UnwindSafe,
Blanket Implementations§
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