cmp

package
v0.0.0-...-12c8fc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 60 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cmp Core components of multi-cloud management platform

Package cmp Core components of multi-cloud management platform

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateNamespaceAllocatedRes

func CalculateNamespaceAllocatedRes(name string, pods []types.APIObject) (cpu, mem, podNum int64)

CalculateNamespaceAllocatedRes calculate allocated cpu, memory and pods for target namespaces

func CalculateNodeAllocatedRes

func CalculateNodeAllocatedRes(nodeName string, pods []types.APIObject) (cpu, mem, podNum int64)

CalculateNodeAllocatedRes calculate allocated cpu, memory and pods for target node

func GetNamespaceAllocatedRes

func GetNamespaceAllocatedRes(ctx context.Context, server SteveServer, noAuthentication bool, clusterName, userID, orgID string, namespaces []string) (map[string]AllocatedRes, error)

GetNamespaceAllocatedRes get nodes allocated resource from cache, and update cache in goroutine

func GetNodesAllocatedRes

func GetNodesAllocatedRes(ctx context.Context, server SteveServer, noAuthentication bool, clusterName, userID, orgID string, nodes []data.Object) (map[string]AllocatedRes, error)

GetNodesAllocatedRes get nodes allocated resource from cache, and update cache in goroutine

func IsVirtualNode

func IsVirtualNode(node data.Object) bool

Types

type AllocatedRes

type AllocatedRes struct {
	CPU    int64 `json:"cpu"`
	Mem    int64 `json:"mem"`
	PodNum int64 `json:"podNum"`
}

Directories

Path Synopsis
component-protocol
Package conf Define the configuration
Package conf Define the configuration
impl
ess
mns
services

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL