binary

package
v0.0.0-...-ff909ee Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 11 Imported by: 18

Documentation

Index

Constants

View Source
const (
	CalculateDeployCommand  = "calculate-deploy"
	CalculateReallocCommand = "calculate-realloc"
	CalculateRemapCommand   = "calculate-remap"

	AddNodeCommand    = "add-node"
	RemoveNodeCommand = "remove-node"

	GetNodesDeployCapacityCommand = "get-nodes-deploy-capacity"

	SetNodeResourceCapacityCommand = "set-node-resource-capacity"

	GetNodeResourceInfoCommand = "get-node-resource-info"
	SetNodeResourceInfoCommand = "set-node-resource-info"

	SetNodeResourceUsageCommand = "set-node-resource-usage"

	GetMostIdleNodeCommand = "get-most-idle-node"

	FixNodeResourceCommand = "fix-node-resource"

	GetMetricsDescriptionCommand = "get-metrics-description"
	GetMetricsCommand            = "get-metrics"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

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

Plugin

func NewPlugin

func NewPlugin(_ context.Context, path string, config coretypes.Config) (*Plugin, error)

NewPlugin .

func (Plugin) AddNode

AddNode .

func (Plugin) CalculateDeploy

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

CalculateDeploy .

func (Plugin) CalculateRealloc

CalculateRealloc .

func (Plugin) CalculateRemap

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

CalculateRemap .

func (Plugin) FixNodeResource

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

FixNodeResource .

func (Plugin) GetMetrics

func (p Plugin) GetMetrics(ctx context.Context, podname, nodename string) (*plugintypes.GetMetricsResponse, error)

GetMetrics .

func (Plugin) GetMetricsDescription

func (p Plugin) GetMetricsDescription(ctx context.Context) (*plugintypes.GetMetricsDescriptionResponse, error)

GetMetricsDescription .

func (Plugin) GetMostIdleNode

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

GetMostIdleNode .

func (Plugin) GetNodeResourceInfo

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

GetNodeResourceInfo .

func (Plugin) GetNodesDeployCapacity

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

GetNodesDeployCapacity .

func (Plugin) Name

func (p Plugin) Name() string

Name .

func (Plugin) RemoveNode

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

RemoveNode .

func (Plugin) SetNodeResourceCapacity

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

SetNodeResourceCapacity .

func (Plugin) SetNodeResourceInfo

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

SetNodeResourceInfo .

func (Plugin) SetNodeResourceUsage

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

SetNodeResourceUsage .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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