mirror of
https://github.com/yusing/godoxy.git
synced 2026-02-16 05:47:45 +01:00
Implement a new API endpoint to retrieve real-time statistics for Proxmox LXC containers, similar to `docker stats` functionality. Changes: - Add `GET /api/v1/proxmox/stats/:node/:vmid` endpoint with HTTP and WebSocket support - Implement resource polling loop to cache VM metadata every 3 seconds - Create `LXCStats()` method with streaming (websocket) and single-shot modes - Format output as: STATUS|CPU%|MEM USAGE/LIMIT|MEM%|NET I/O|BLOCK I/O - Add `GetResource()` method for efficient VM resource lookup by kind and ID - Fix task creation bug using correct client reference Example response: running|31.1%|9.6GiB/20GiB|48.87%|4.7GiB/3.3GiB|25GiB/36GiB
23 lines
647 B
Modula-2
23 lines
647 B
Modula-2
module github.com/yusing/godoxy/socketproxy
|
|
|
|
go 1.25.6
|
|
|
|
replace github.com/yusing/goutils => ../goutils
|
|
|
|
require (
|
|
github.com/gorilla/mux v1.8.1
|
|
github.com/yusing/goutils v0.7.0
|
|
golang.org/x/net v0.49.0
|
|
)
|
|
|
|
require (
|
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
|
github.com/mattn/go-colorable v0.1.14 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
|
github.com/puzpuzpuz/xsync/v4 v4.4.0 // indirect
|
|
github.com/rs/zerolog v1.34.0 // indirect
|
|
golang.org/x/sys v0.40.0 // indirect
|
|
golang.org/x/text v0.33.0 // indirect
|
|
)
|