MCPcopy Create free account
hub / github.com/dfinity/orbit / router

Method router

core/station/impl/src/controllers/http.rs:29–37  ·  view source on GitHub ↗
(&self, request: HttpRequest)

Source from the content-addressed store, hash-verified

27 }
28
29 async fn router(&self, request: HttpRequest) -> HttpResponse {
30 match parse_path(&request.url) {
31 Some(path) => match path.trim_end_matches('/') {
32 "/metrics" => self.metrics(request).await,
33 _ => not_found(),
34 },
35 None => not_found(),
36 }
37 }
38
39 async fn metrics(&self, request: HttpRequest) -> HttpResponse {
40 if request.method.to_lowercase() != "get" {

Callers 1

http_requestFunction · 0.45

Calls 3

parse_pathFunction · 0.85
not_foundFunction · 0.85
metricsMethod · 0.45

Tested by

no test coverage detected