-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
51 lines (45 loc) · 1.11 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package main
type RadNodeInfo struct {
ID string `json:"id"`
Agent string `json:"agent"`
State string `json:"state"`
Config struct {
SeedingPolicy struct {
Default string `json:"default"`
} `json:"seedingPolicy"`
} `json:"config"`
}
type RadNodeRepos struct {
Repos struct {
Total int `json:"total"`
} `json:"repos"`
}
type SystemStats struct {
CPUUsage float64 `json:"cpuUsage"`
MemoryUsed uint64 `json:"memoryUsed"`
MemoryTotal uint64 `json:"memoryTotal"`
OS string `json:"os"`
Kernel string `json:"kernel"`
Uptime string `json:"uptime"`
CPUModel string `json:"cpuModel"`
}
type IPFSRepoStats struct {
RepoSize int64 `json:"RepoSize"`
StorageMax int64 `json:"StorageMax"`
NumObjects int `json:"NumObjects"`
RepoPath string `json:"RepoPath"`
Version string `json:"Version"`
}
type BandwidthStats struct {
RateIn float64 `json:"RateIn"`
RateOut float64 `json:"RateOut"`
TotalIn int64 `json:"TotalIn"`
TotalOut int64 `json:"TotalOut"`
}
type CombinedStats struct {
IPFSRepoStats
BandwidthStats
SystemStats
RadNodeInfo
RadNodeRepos
}