Documentation
¶
Index ¶
- Constants
- func AddResourceList(total corev1.ResourceList, add corev1.ResourceList)
- func AppendResourceNamePrefix(prefix string, list corev1.ResourceList) corev1.ResourceList
- func FilterResourceName(list corev1.ResourceList, keep func(name corev1.ResourceName) bool) corev1.ResourceList
- func GetClusterTenantResourceQuotaLimits(ctx context.Context, cli client.Client) (corev1.ResourceList, error)
- func ResourceListCollect(into, vals corev1.ResourceList, collect ResourceListCollectFunc) corev1.ResourceList
- func SubResourceList(total corev1.ResourceList, sub corev1.ResourceList)
- type ClusterPodResourceStatistics
- type ClusterResourceStatistics
- type ClusterStatistics
- type ClusterWorkloadStatistics
- type ResourceListCollectFunc
Constants ¶
View Source
const ResourceLimitsPrefix = "limits."
Variables ¶
This section is empty.
Functions ¶
func AddResourceList ¶
func AddResourceList(total corev1.ResourceList, add corev1.ResourceList)
func AppendResourceNamePrefix ¶ added in v1.22.0
func AppendResourceNamePrefix(prefix string, list corev1.ResourceList) corev1.ResourceList
func FilterResourceName ¶ added in v1.22.0
func FilterResourceName(list corev1.ResourceList, keep func(name corev1.ResourceName) bool) corev1.ResourceList
func GetClusterTenantResourceQuotaLimits ¶ added in v1.22.0
func ResourceListCollect ¶
func ResourceListCollect(into, vals corev1.ResourceList, collect ResourceListCollectFunc) corev1.ResourceList
func SubResourceList ¶
func SubResourceList(total corev1.ResourceList, sub corev1.ResourceList)
Types ¶
type ClusterPodResourceStatistics ¶
type ClusterPodResourceStatistics struct { Limit corev1.ResourceList `json:"limit"` Request corev1.ResourceList `json:"request"` }
type ClusterResourceStatistics ¶
type ClusterResourceStatistics struct { // 集群资源的总容量,即物理资源总量 Capacity corev1.ResourceList `json:"capacity"` // 集群资源的真实使用量 Used corev1.ResourceList `json:"used"` // 集群下的租户资源分配总量 TenantAllocated corev1.ResourceList `json:"tenantAllocated"` }
func GetClusterResourceStatistics ¶
func GetClusterResourceStatistics(ctx context.Context, cli client.Client) ClusterResourceStatistics
type ClusterStatistics ¶ added in v1.23.0
type ClusterStatistics struct { Version string `json:"version"` Resources ClusterResourceStatistics `json:"resources"` Workloads ClusterWorkloadStatistics `json:"workloads"` }
func GetClusterAllStatistics ¶ added in v1.23.0
func GetClusterAllStatistics(ctx context.Context, cli client.Client, discovery discovery.DiscoveryInterface) *ClusterStatistics
type ClusterWorkloadStatistics ¶
func GetWorkloadsStatistics ¶ added in v1.23.0
func GetWorkloadsStatistics(ctx context.Context, cli client.Client) ClusterWorkloadStatistics
type ResourceListCollectFunc ¶
Click to show internal directories.
Click to hide internal directories.