objectstore_server/endpoints/
mod.rs1use axum::Router;
6
7use crate::state::ServiceState;
8
9mod batch;
10pub mod common;
11pub mod health;
12mod keda;
13mod multipart;
14mod objects;
15#[cfg(all(target_os = "linux", feature = "profiling"))]
16mod profiling;
17
18pub fn is_internal_route(route: &str) -> bool {
20 matches!(route, "/health" | "/ready" | "/keda") || route.starts_with("/debug/")
21}
22
23pub fn routes() -> Router<ServiceState> {
28 let routes_v1 = Router::new()
29 .merge(objects::router())
30 .merge(batch::router())
31 .merge(multipart::router());
32
33 let router = Router::new()
34 .merge(health::router())
35 .merge(keda::router())
36 .nest("/v1/", routes_v1);
37
38 std::cfg_select! {
39 all(target_os = "linux", feature = "profiling") => {
40 router.merge(profiling::router())
41 }
42 _ => { router }
43 }
44}