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

Method router

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

Source from the content-addressed store, hash-verified

35 }
36
37 async fn router(&self, request: HttpRequest) -> HttpResponse {
38 match parse_path(&request.url) {
39 Some(path) => match path.trim_end_matches('/') {
40 "/metrics" => self.metrics(request).await,
41 "/metrics/sd" => self.metrics_service_discovery(request).await,
42 _ => not_found(),
43 },
44 None => not_found(),
45 }
46 }
47
48 /// Returns all deployed station hosts for Prometheus service discovery.
49 ///

Callers 1

http_requestFunction · 0.45

Calls 4

parse_pathFunction · 0.85
not_foundFunction · 0.85
metricsMethod · 0.45

Tested by

no test coverage detected