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:
Jun Wu 2021-04-28 12:21:16 -07:00 committed by Facebook GitHub Bot
parent 540adf776f
commit e1eb399245

View File

@ -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()
}
}