Crate wait_for_them
source ·Expand description
Wait For Them library
this library is used to asynchronously wait when sockets or http(s) services become ready.
Example
use wait_for_them::{ToCheck, wait_for_them};
#[tokio::main]
async fn main() {
let res = wait_for_them(
&[
ToCheck::HostnameAndPort("localhost".into(), 8080),
ToCheck::HttpOrHttpsUrl("https://example.com/".parse().unwrap()),
],
Some(8000), // 8 seconds
None, // time tracker
true, // silent
).await;
}
Enums
Wrapper around items which are going to be checked
Functions
Waits till all hostname and port combinations are opened
or until
200
status code is returned from http(s) URLs.