pageserver client: mgmt_api: expose reset API (#6326)

By-product of some hack work that will be thrown away.
This commit is contained in:
Christian Schwarz
2024-01-12 12:07:16 +01:00
committed by GitHub
parent 8b657a1481
commit eae74383c1

View File

@@ -221,4 +221,16 @@ impl Client {
.await
.map_err(Error::ReceiveBody)
}
pub async fn tenant_reset(&self, tenant_shard_id: TenantShardId) -> Result<()> {
let uri = format!(
"{}/v1/tenant/{}/reset",
self.mgmt_api_endpoint, tenant_shard_id
);
self.request(Method::POST, &uri, ())
.await?
.json()
.await
.map_err(Error::ReceiveBody)
}
}