Function surf_disco::connect
source · pub async fn connect<E: Error, VER: StaticVersionType>(
url: Url,
timeout: Option<Duration>
) -> bool
Expand description
Connect to a server, retrying if the server is not running.
This function will make an HTTP GET
request to the server’s /healthcheck
endpoint, to test
if the server is available. If this request succeeds, connect returns true
. Otherwise, the
client will continue retrying /healthcheck
requests until timeout
has elapsed (or forever,
if timeout
is None
). If the timeout expires before a /healthcheck
request succeeds,
connect will return false
.