Skip to main content

CowProbe

Type Alias CowProbe 

Source
pub type CowProbe<'a> = Probe<Cow<'a, str>>;
Expand description

A Probe that borrows its request string to avoid allocation when converting from VCL.

Aliased Type§

pub struct CowProbe<'a> {
    pub request: Request<Cow<'a, str>>,
    pub timeout: Duration,
    pub interval: Duration,
    pub exp_status: u32,
    pub window: u32,
    pub threshold: u32,
    pub initial: u32,
}

Fields§

§request: Request<Cow<'a, str>>

The request to send on each probe attempt.

§timeout: Duration

How long to wait for a response before considering the probe failed.

§interval: Duration

How often to send probe requests.

§exp_status: u32

The HTTP status code considered healthy (e.g. 200). 0 means any 2xx status.

§window: u32

Number of most recent probes to consider when evaluating health (sliding window size).

§threshold: u32

Minimum number of successful probes within window to consider the backend healthy.

§initial: u32

Number of probes that are assumed successful when the backend starts up.

Implementations§

Source§

impl CowProbe<'_>

Source

pub fn to_owned(&self) -> Probe

Convert this borrowed probe into an owned Probe<String>.

Trait Implementations§