add api framework
Some checks failed
CI / test-build (push) Failing after 59s

This commit is contained in:
2025-12-14 22:15:56 +07:00
parent f4683eeb73
commit a6da313dfc
13 changed files with 915 additions and 84 deletions

View File

@@ -30,12 +30,12 @@ func (a *App) handleMetrics(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain; version=0.0.4")
w.WriteHeader(http.StatusOK)
_, _ = w.Write([]byte(
`# HELP pluto_build_info Build info
# TYPE pluto_build_info gauge
pluto_build_info{version="v0.1.0-dev"} 1
# HELP pluto_up Whether the pluto-api process is up
# TYPE pluto_up gauge
pluto_up 1
`# HELP atlas_build_info Build info
# TYPE atlas_build_info gauge
atlas_build_info{version="v0.1.0-dev"} 1
# HELP atlas_up Whether the atlas-api process is up
# TYPE atlas_up gauge
atlas_up 1
`,
))
}