Skip to main content

poll

Function poll 

Source
pub async fn poll(
    url: &str,
    expected_status: u16,
    contains: Option<&str>,
    budget: Duration,
) -> Result<(), HealthFailure>
Expand description

Poll url until it returns expected_status and (when set) a body containing contains, or budget expires. Each failed attempt records why, so the returned detail explains the last thing seen.