pub async fn keep_alive(&mut self) -> Result<()> {
        match self.id.clone() {
            Some(tail_id) => {
                match http::cf_v4_api_client_async(&self.user)?
                    .request(&SendTailHeartbeat {
                        account_identifier: &self.account_id,
                        script_name: &self.script_name,
                        tail_id: &tail_id,
                    })
                    .await
                {
                    Ok(response) => {
                        log::debug!("Sent tail keep-alive tail: {:?}", response.result);
                        self.expires_at = to_instant(response.result.expires_at);
                        Ok(())
                    }
                    Err(err) => {
                        anyhow::bail!(
                            "Failed to keep-alive tail: {}",
                            http::format_error(err, None)
                        )
                    }
                }
            }
            _ => Ok(()),
        }
    }
/// Sends a keep-alive to the tail.
Sends a keep-alive to the tail.
Sends a keep - alive to the tail .
pub async fn keep_alive(&mut self) -> Result<()> {
        match self.id.clone() {
            Some(tail_id) => {
                match http::cf_v4_api_client_async(&self.user)?
                    .request(&SendTailHeartbeat {
                        account_identifier: &self.account_id,
                        script_name: &self.script_name,
                        tail_id: &tail_id,
                    })
                    .await
                {
                    Ok(response) => {
                        log::debug!("Sent tail keep-alive tail: {:?}", response.result);
                        self.expires_at = to_instant(response.result.expires_at);
                        Ok(())
                    }
                    Err(err) => {
                        anyhow::bail!(
                            "Failed to keep-alive tail: {}",
                            http::format_error(err, None)
                        )
                    }
                }
            }
            _ => Ok(()),
        }
    }
pub async fn keep_alive ( & mut self ) -> Result < ( ) > { match self . id . clone ( ) { Some ( tail_id ) => { match http :: cf_v4_api_client_async ( & self . user ) ? . request ( & SendTailHeartbeat { account_identifier : & self . account_id , script_name : & self . script_name , tail_id : & tail_id , } ) . await { Ok ( response ) => { log :: debug ! ( " " response result ) ; self . expires_at = to_instant ( response . result . expires_at ) ; Ok ( ( ) ) } Err ( err ) => { anyhow :: bail ! ( " " http format_error ( err None ) ) } } } _ => Ok ( ( ) ) , } }
Sends a keep-alive to the tail.
Sends a keep - alive to the tail .
&mut self
&mut self