Documentation ¶
Index ¶
- type Plugin
- func (p Plugin) AddNode(ctx context.Context, nodename string, resource plugintypes.NodeResourceRequest, ...) (*plugintypes.AddNodeResponse, error)
- func (p Plugin) CalculateDeploy(ctx context.Context, nodename string, deployCount int, ...) (*plugintypes.CalculateDeployResponse, error)
- func (p Plugin) CalculateRealloc(ctx context.Context, nodename string, resource plugintypes.WorkloadResource, ...) (*plugintypes.CalculateReallocResponse, error)
- func (p Plugin) CalculateRemap(context.Context, string, map[string]plugintypes.WorkloadResource) (*plugintypes.CalculateRemapResponse, error)
- func (p Plugin) FixNodeResource(ctx context.Context, nodename string, ...) (*plugintypes.GetNodeResourceInfoResponse, error)
- func (p Plugin) GetMetrics(ctx context.Context, podname, nodename string) (*plugintypes.GetMetricsResponse, error)
- func (p Plugin) GetMetricsDescription(context.Context) (*plugintypes.GetMetricsDescriptionResponse, error)
- func (p Plugin) GetMostIdleNode(ctx context.Context, nodenames []string) (*plugintypes.GetMostIdleNodeResponse, error)
- func (p Plugin) GetNodeResourceInfo(ctx context.Context, nodename string, ...) (*plugintypes.GetNodeResourceInfoResponse, error)
- func (p Plugin) GetNodesDeployCapacity(ctx context.Context, nodenames []string, ...) (*plugintypes.GetNodesDeployCapacityResponse, error)
- func (p Plugin) Name() string
- func (p Plugin) RemoveNode(ctx context.Context, nodename string) (*plugintypes.RemoveNodeResponse, error)
- func (p Plugin) SetNodeResourceCapacity(ctx context.Context, nodename string, ...) (*plugintypes.SetNodeResourceCapacityResponse, error)
- func (p Plugin) SetNodeResourceInfo(ctx context.Context, nodename string, capacity plugintypes.NodeResource, ...) (*plugintypes.SetNodeResourceInfoResponse, error)
- func (p Plugin) SetNodeResourceUsage(ctx context.Context, nodename string, ...) (*plugintypes.SetNodeResourceUsageResponse, error)
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
func (Plugin) AddNode ¶
func (p Plugin) AddNode( ctx context.Context, nodename string, resource plugintypes.NodeResourceRequest, info *enginetypes.Info, ) ( *plugintypes.AddNodeResponse, error, )
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 ¶
func (p Plugin) CalculateRealloc( ctx context.Context, nodename string, resource plugintypes.WorkloadResource, resourceRequest plugintypes.WorkloadResourceRequest, ) ( *plugintypes.CalculateReallocResponse, error, )
CalculateRealloc .
func (Plugin) CalculateRemap ¶
func (p Plugin) CalculateRemap(context.Context, string, 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 . use workloadsReource to construct a new NodeResource, then use this NodeResource to repace Usage
func (Plugin) GetMetrics ¶
func (p Plugin) GetMetrics(ctx context.Context, podname, nodename string) (*plugintypes.GetMetricsResponse, error)
GetMetrics .
func (Plugin) GetMetricsDescription ¶
func (p Plugin) GetMetricsDescription(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 returns available nodes and total capacity
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, resourceRequest plugintypes.NodeResourceRequest, resource plugintypes.NodeResource, delta bool, incr bool, ) ( *plugintypes.SetNodeResourceCapacityResponse, error, )
SetNodeResourceCapacity sets the amount of total resource info
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, resourceRequest plugintypes.NodeResourceRequest, resource plugintypes.NodeResource, workloadsResource []plugintypes.WorkloadResource, delta bool, incr bool, ) ( *plugintypes.SetNodeResourceUsageResponse, error, )
SetNodeResourceUsage .
Click to show internal directories.
Click to hide internal directories.