Function
fetch_topology
(client: &Client, server: &str)
Source from the content-addressed store, hash-verified
| 864 | } |
| 865 | |
| 866 | async fn fetch_topology(client: &Client, server: &str) -> Result<TopologyResponse> { |
| 867 | let resp = client |
| 868 | .get(format!("{}/api/v1/topology", server)) |
| 869 | .send() |
| 870 | .await?; |
| 871 | if !resp.status().is_success() { |
| 872 | anyhow::bail!("topology API error: {}", resp.status()); |
| 873 | } |
| 874 | Ok(resp.json().await?) |
| 875 | } |
| 876 | |
| 877 | // ── Main loop ────────────────────────────────────────────────────────────── |
| 878 | |
Tested by
no test coverage detected