mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 21:34:27 +01:00
6465a3f549
1. NEEDS to ensure that service is completely up if it returns 204 2. DOES NOT block service process (write transaction) 3. NEEDS to use the less network bandwidth as possible when it's triggered 4. NEEDS to use the less service resources as possible when it's triggered 5. DOES NOT NEED any authentication 6. MAY be named /health
14 lines
297 B
Rust
14 lines
297 B
Rust
use actix_web::get;
|
|
use actix_web::{web, HttpResponse};
|
|
|
|
use crate::error::ResponseError;
|
|
|
|
pub fn services(cfg: &mut web::ServiceConfig) {
|
|
cfg.service(get_health);
|
|
}
|
|
|
|
#[get("/health")]
|
|
async fn get_health() -> Result<HttpResponse, ResponseError> {
|
|
Ok(HttpResponse::NoContent().finish())
|
|
}
|