/// Returns true if [IcEndpoint] is healthy, i.e. up and running and ready
/// for interaction. A status of the endpoint is requested from the
/// public API.
Returns true if [IcEndpoint] is healthy, i.e. up and running and ready
for interaction. A status of the endpoint is requested from the
public API.
Returns true if [ IcEndpoint ] is healthy i . e . up and running and ready for interaction . A status of the endpoint is requested from the public API .
pub async fn healthy(&self) -> Result<bool> {
        let response = reqwest::Client::builder()
            .timeout(READY_RESPONSE_TIMEOUT)
            .build()
            .expect("cannot build a reqwest client")
            .get(
                self.url
                    .clone()
                    .join("api/v2/status")
                    .expect("failed to join URLs"),
            )
            .send()
            .await?;
        let cbor_response = serde_cbor::from_slice(
            &response
                .bytes()
                .await
                .expect("failed to convert a response to bytes")
                .to_vec(),
        )
        .expect("response is not encoded as cbor");
        let status = serde_cbor::value::from_value::<HttpStatusResponse>(cbor_response)
            .expect("failed to deserialize a response to HttpStatusResponse");
        Ok(Some(ReplicaHealthStatus::Healthy) == status.replica_health_status)
    }
pub async fn healthy ( & self ) -> Result < bool > { let response = reqwest :: Client :: builder ( ) . timeout ( READY_RESPONSE_TIMEOUT ) . build ( ) . expect ( " " ) . get ( self . url . clone ( ) . join ( " " ) . expect ( " " ) , ) . send ( ) . await ? ; let cbor_response = serde_cbor :: from_slice ( & response . bytes ( ) . await . expect ( " " ) . to_vec ( ) , ) . expect ( " " ) ; let status = serde_cbor :: value :: from_value :: < HttpStatusResponse > ( cbor_response ) . expect ( " " ) ; Ok ( Some ( ReplicaHealthStatus :: Healthy ) == status . replica_health_status ) }
Returns true if [IcEndpoint] is healthy, i.e.
Returns true if [ IcEndpoint ] is healthy i . e .
&self