3 Star 0 Fork 0

neuro-netw0rk/server-servicegolib

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
entity.go 1.55 KB
一键复制 编辑 原始数据 按行查看 历史
HaminyG 提交于 2023-08-02 16:58 +08:00 . update: 更新集群资源信息换算
package cluster
import (
corrdinv1 "k8s.io/api/coordination/v1"
corev1 "k8s.io/api/core/v1"
)
type ResourceList map[string]float64
type NonTerminatedPod struct {
NameSpace string `json:"namespace"`
Name string `json:"name"`
Limits ResourceList `json:"limits"`
Request ResourceList `json:"request"`
}
type AllocatedResources struct {
Limits ResourceList `json:"limits"`
Request ResourceList `json:"request"`
}
type NodeDescribe struct {
Name string `json:"name,omitempty"`
Role string `json:"role,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
Taints []corev1.Taint `json:"taints,omitempty"`
Unschedulable bool `json:"unschedulable,omitempty"`
Lease *corrdinv1.Lease `json:"lease,omitempty"`
Conditions *[]corev1.NodeCondition `json:"conditions,omitempty"`
Address *[]corev1.NodeAddress `json:"address,omitempty"`
Capacity *ResourceList `json:"capacity,omitempty"`
Allocatable *ResourceList `json:"allocatable,omitempty"`
SystemInfo *corev1.NodeSystemInfo `json:"systemInfo,omitempty"`
PodCIDR string `json:"podCIDR,omitempty"`
PodCIDRs *[]string `json:"podCIDRs,omitempty"`
NonTerminatedPods *[]NonTerminatedPod `json:"nonTerminatedPods,omitempty"`
AllocatedResources AllocatedResources `json:"allocatedResources,omitempty"`
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/neuro-netw0rk/server-servicegolib.git
git@gitee.com:neuro-netw0rk/server-servicegolib.git
neuro-netw0rk
server-servicegolib
server-servicegolib
615e99e2ef31

搜索帮助