mz_environmentd/http/
memory.rs

1// Copyright Materialize, Inc. and contributors. All rights reserved.
2//
3// Use of this software is governed by the Business Source License
4// included in the LICENSE file.
5//
6// As of the Change Date specified in that file, in accordance with
7// the Business Source License, use of this software will be governed
8// by the Apache License, Version 2.0.
9
10use askama::Template;
11use axum::response::IntoResponse;
12
13use crate::BUILD_INFO;
14
15#[derive(Template)]
16#[template(path = "memory.html")]
17struct MemoryTemplate<'a> {
18    version: &'a str,
19}
20
21pub async fn handle_memory() -> impl IntoResponse {
22    mz_http_util::template_response(MemoryTemplate {
23        version: BUILD_INFO.version,
24    })
25}
26
27#[derive(Template)]
28#[template(path = "hierarchical-memory.html")]
29struct HierarchicalMemoryTemplate<'a> {
30    version: &'a str,
31}
32
33pub async fn handle_hierarchical_memory() -> impl IntoResponse {
34    mz_http_util::template_response(HierarchicalMemoryTemplate {
35        version: BUILD_INFO.version,
36    })
37}