-
Notifications
You must be signed in to change notification settings - Fork 57
/
types.go
44 lines (38 loc) · 852 Bytes
/
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
package scout
import (
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
metricsv "k8s.io/metrics/pkg/client/clientset/versioned"
)
type Config struct {
Namespace string
Pod string
Output string
Warnings bool
RestConfig *rest.Config
K8sClient *kubernetes.Clientset
MetricsClient *metricsv.Clientset
}
type ContainerMetrics struct {
PodName string
Limits map[string]Resources
}
type Resources struct {
Cpu *resource.Quantity
Memory *resource.Quantity
Storage *resource.Quantity
}
type UsageStats struct {
ContainerName string
CpuCores *resource.Quantity
Memory *resource.Quantity
Storage *resource.Quantity
CpuUsage float64
MemoryUsage float64
StorageUsage float64
}
type Advice struct {
Kind string
Msg string
}