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 []types2.APIObject) (cpu, mem, podNum int64)
- func CalculateNodeAllocatedRes(nodeName string, pods []types2.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 ¶ added in v1.4.0
CalculateNamespaceAllocatedRes calculate allocated cpu, memory and pods for target namespaces
func CalculateNodeAllocatedRes ¶ added in v1.4.0
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
Types ¶
type AllocatedRes ¶ added in v1.4.0
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.