feat(api): add system resource monitoring functionality

- implement getSystemInfo to gather CPU and memory usage
- add platform-specific implementations for memory and CPU usage
- enhance OpenAPI documentation to include system resource metrics
This commit is contained in:
Sergey Krashevich
2026-02-13 14:49:20 +03:00
parent ab80450b66
commit 0b80fa53cf
8 changed files with 415 additions and 0 deletions
+1
View File
@@ -239,6 +239,7 @@ func apiHandler(w http.ResponseWriter, r *http.Request) {
mu.Lock()
app.Info["host"] = r.Host
app.Info["pid"] = os.Getpid()
app.Info["system"] = getSystemInfo()
mu.Unlock()
ResponseJSON(w, app.Info)