/
cluster-status.go
37 lines (33 loc) · 1.46 KB
/
cluster-status.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
package dtos
import (
"time"
"github.com/mogenius/punq/utils"
)
type ClusterStatusDto struct {
ClusterName string `json:"clusterName"`
Pods int `json:"pods"`
PodCpuUsageInMilliCores int `json:"podCpuUsageInMilliCores"`
PodCpuLimitInMilliCores int `json:"podCpuLimitInMilliCores"`
PodMemoryUsageInBytes int64 `json:"podMemoryUsageInBytes"`
PodMemoryLimitInBytes int64 `json:"podMemoryLimitInBytes"`
EphemeralStorageLimitInBytes int64 `json:"ephemeralStorageLimitInBytes"`
CurrentTime string `json:"currentTime"`
KubernetesVersion string `json:"kubernetesVersion"`
Platform string `json:"platform"`
Country *utils.CountryDetails `json:"country"`
}
func ClusterStatusDtoExmapleData() ClusterStatusDto {
return ClusterStatusDto{
ClusterName: "clusterName",
Pods: 1,
PodCpuUsageInMilliCores: 1,
PodCpuLimitInMilliCores: 1,
PodMemoryUsageInBytes: 123,
PodMemoryLimitInBytes: 1234,
EphemeralStorageLimitInBytes: 166,
CurrentTime: time.Now().Format(time.RFC3339),
KubernetesVersion: "v1.27.2",
Platform: "linux/arm64",
Country: nil,
}
}