mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
eagerepo: implement EdenApi "health" endpoint
Summary: Implement the health API. Reviewed By: kulshrax Differential Revision: D27926249 fbshipit-source-id: 1cbaf7859132387c1260ca981164549721685b9f
This commit is contained in:
parent
540adf776f
commit
e1eb399245
@ -30,7 +30,7 @@ use http::Version;
|
||||
#[async_trait::async_trait]
|
||||
impl EdenApi for EagerRepo {
|
||||
async fn health(&self) -> edenapi::Result<ResponseMeta> {
|
||||
todo!()
|
||||
Ok(default_response_meta())
|
||||
}
|
||||
|
||||
async fn files(
|
||||
@ -127,3 +127,12 @@ impl EdenApi for EagerRepo {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
fn default_response_meta() -> ResponseMeta {
|
||||
ResponseMeta {
|
||||
version: Version::HTTP_11,
|
||||
status: StatusCode::OK,
|
||||
server: Some("EagerRepo".to_string()),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user