cpumem

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin is the built-in cpu and memory resource plugin.

func NewPlugin

func NewPlugin(config coretypes.Config, store Store) *Plugin

func (Plugin) AddNode

func (Plugin) CalculateDeploy

func (p Plugin) CalculateDeploy(ctx context.Context, nodename string, deployCount int, resourceRequest plugintypes.WorkloadResourceRequest) (*plugintypes.CalculateDeployResponse, error)

func (Plugin) CalculateRealloc

func (Plugin) CalculateRemap

func (p Plugin) CalculateRemap(ctx context.Context, nodename string, workloadsResource map[string]plugintypes.WorkloadResource) (*plugintypes.CalculateRemapResponse, error)

func (Plugin) FixNodeResource

func (p Plugin) FixNodeResource(ctx context.Context, nodename string, workloadsResource []plugintypes.WorkloadResource) (*plugintypes.GetNodeResourceInfoResponse, error)

func (Plugin) GetMetrics

func (Plugin) GetMetricsDescription

func (Plugin) GetMostIdleNode

func (p Plugin) GetMostIdleNode(ctx context.Context, nodenames []string) (*plugintypes.GetMostIdleNodeResponse, error)

func (Plugin) GetNodeResourceInfo

func (p Plugin) GetNodeResourceInfo(ctx context.Context, nodename string, workloadsResource []plugintypes.WorkloadResource) (*plugintypes.GetNodeResourceInfoResponse, error)

func (Plugin) GetNodesDeployCapacity

func (p Plugin) GetNodesDeployCapacity(ctx context.Context, nodenames []string, resource plugintypes.WorkloadResourceRequest) (*plugintypes.GetNodesDeployCapacityResponse, error)

func (Plugin) Name

func (p Plugin) Name() string

func (Plugin) RemoveNode

func (p Plugin) RemoveNode(ctx context.Context, nodename string) (*plugintypes.RemoveNodeResponse, error)

func (Plugin) SetNodeResourceCapacity

func (p Plugin) SetNodeResourceCapacity(ctx context.Context, nodename string, resource plugintypes.NodeResource, resourceRequest plugintypes.NodeResourceRequest, delta, incr bool) (*plugintypes.SetNodeResourceCapacityResponse, error)

func (Plugin) SetNodeResourceInfo

func (p Plugin) SetNodeResourceInfo(ctx context.Context, nodename string, capacity, usage plugintypes.NodeResource) (*plugintypes.SetNodeResourceInfoResponse, error)

func (Plugin) SetNodeResourceUsage

func (p Plugin) SetNodeResourceUsage(ctx context.Context, nodename string, resource plugintypes.NodeResource, resourceRequest plugintypes.NodeResourceRequest, workloadsResource []plugintypes.WorkloadResource, delta, incr bool) (*plugintypes.SetNodeResourceUsageResponse, error)

type Store added in v0.1.4

type Store interface {
	NotFound(err error) bool
	GetMulti(ctx context.Context, keys []string) (map[string]string, error)
	Put(ctx context.Context, data map[string]string) error
	Delete(ctx context.Context, keys []string) error
}

Store is the slice of the cluster store that keeps the node records of this plugin.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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