mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-27 10:00:38 +00:00
This is a refactor to create better abstractions related to our management server. It cleans up the code, and prepares everything for authorized communication to and from the control plane. Signed-off-by: Tristan Partin <tristan@neon.tech>
12 lines
372 B
Rust
12 lines
372 B
Rust
use axum::response::Response;
|
|
use compute_api::responses::InfoResponse;
|
|
use http::StatusCode;
|
|
|
|
use crate::http::JsonResponse;
|
|
|
|
/// Get information about the physical characteristics about the compute.
|
|
pub(in crate::http) async fn get_info() -> Response {
|
|
let num_cpus = num_cpus::get_physical();
|
|
JsonResponse::success(StatusCode::OK, &InfoResponse { num_cpus })
|
|
}
|