(&self, timeout: Duration)
| 146 | } |
| 147 | |
| 148 | pub async fn probe(&self, timeout: Duration) -> Result<()> { |
| 149 | let response = tokio::time::timeout(timeout, self.ping()).await; |
| 150 | if matches!(response, Ok(Ok(_))) { |
| 151 | Ok(()) |
| 152 | } else { |
| 153 | anyhow::bail!("failed to probe supervisor") |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | pub async fn clear(&self) -> Result<()> { |
| 158 | self.http_request("POST", "/clear", ()).await |
no test coverage detected