Documentation ¶
Overview ¶
Package cmp Core components of multi-cloud management platform
Package cmp Core components of multi-cloud management platform
Index ¶
- func CalculateNamespaceAllocatedRes(name string, pods []types.APIObject) (cpu, mem, podNum int64)
- func CalculateNodeAllocatedRes(nodeName string, pods []types.APIObject) (cpu, mem, podNum int64)
- func GetNamespaceAllocatedRes(ctx context.Context, server SteveServer, noAuthentication bool, ...) (map[string]AllocatedRes, error)
- func GetNodesAllocatedRes(ctx context.Context, server SteveServer, noAuthentication bool, ...) (map[string]AllocatedRes, error)
- func IsVirtualNode(node data.Object) bool
- type AllocatedRes
- type SteveServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateNamespaceAllocatedRes ¶
CalculateNamespaceAllocatedRes calculate allocated cpu, memory and pods for target namespaces
func CalculateNodeAllocatedRes ¶
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 ¶
Types ¶
type AllocatedRes ¶
type SteveServer ¶
type SteveServer interface { GetSteveResource(context.Context, *apistructs.SteveRequest) (types.APIObject, error) ListSteveResource(context.Context, *apistructs.SteveRequest) ([]types.APIObject, error) UpdateSteveResource(context.Context, *apistructs.SteveRequest) (types.APIObject, error) CreateSteveResource(context.Context, *apistructs.SteveRequest) (types.APIObject, error) DeleteSteveResource(context.Context, *apistructs.SteveRequest) error PatchNode(context.Context, *apistructs.SteveRequest) error LabelNode(context.Context, *apistructs.SteveRequest, map[string]string) error UnlabelNode(context.Context, *apistructs.SteveRequest, []string) error CordonNode(context.Context, *apistructs.SteveRequest) error UnCordonNode(context.Context, *apistructs.SteveRequest) error DrainNode(context.Context, *apistructs.SteveRequest) error OfflineNode(context.Context, string, string, string, []string) error OnlineNode(context.Context, *apistructs.SteveRequest) error Auth(userID, orgID, clusterName string) (apiuser.Info, error) }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
component-protocol
|
|
Package conf Define the configuration
|
Package conf Define the configuration |
impl
|
|
services
|
|
Click to show internal directories.
Click to hide internal directories.