cmp

package
v1.3.0-rc.0...-d217119 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 59 Imported by: 0

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