mirror of
https://github.com/trafficlunar/api.git
synced 2026-06-27 22:24:08 +00:00
feat: add timestamps to computer graph data
This commit is contained in:
parent
e97b271bd7
commit
43628a1a66
4 changed files with 52 additions and 20 deletions
|
|
@ -1,12 +1,19 @@
|
|||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type ComputerWebSocketMessage struct {
|
||||
Cpu uint8 `json:"cpu"`
|
||||
Ram uint8 `json:"ram"`
|
||||
}
|
||||
|
||||
type ComputerGraphData struct {
|
||||
Online bool `json:"online"`
|
||||
Cpu []int `json:"cpu"`
|
||||
Ram []int `json:"ram"`
|
||||
type ComputerData struct {
|
||||
Online bool `json:"online"`
|
||||
Graph []ComputerGraphData `json:"graph"`
|
||||
}
|
||||
|
||||
type ComputerGraphData struct {
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
Cpu int `json:"cpu"`
|
||||
Ram int `json:"ram"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue