cmp

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 54 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 added in v1.4.0

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

CalculateNamespaceAllocatedRes calculate allocated cpu, memory and pods for target namespaces

func CalculateNodeAllocatedRes added in v1.4.0

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

CalculateNodeAllocatedRes calculate allocated cpu, memory and pods for target node

func GetNamespaceAllocatedRes added in v1.4.0

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 added in v1.4.0

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 added in v1.4.0

func IsVirtualNode(node data.Object) bool

Types

type AllocatedRes added in v1.4.0

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