algorithm

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoClustersAvailable = fmt.Errorf("no clusters available to schedule subscriptions")

ErrNoClustersAvailable is used to describe the error that no clusters available to schedule subscriptions.

Functions

This section is empty.

Types

type ScheduleAlgorithm

type ScheduleAlgorithm interface {
	Schedule(context.Context, framework.Framework, *framework.CycleState, *appsapi.Subscription, *appsapi.FeedInventory) (scheduleResult ScheduleResult, err error)
}

ScheduleAlgorithm is an interface implemented by things that know how to schedule resources to target managed clusters.

func NewGenericScheduler

func NewGenericScheduler(cache schedulercache.Cache, percentageOfClustersToScore int32) ScheduleAlgorithm

NewGenericScheduler creates a genericScheduler object.

type ScheduleResult

type ScheduleResult struct {
	// the scheduler suggest clusters (namespaced name)
	SuggestedClusters framework.TargetClusters
	// Number of clusters scheduler evaluated on one subscription scheduled
	EvaluatedClusters int
	// Number of feasible clusters on one subscription scheduled
	FeasibleClusters int
}

ScheduleResult represents the result of one subscription scheduled. It will contain the final selected clusters, along with the selected intermediate information.

Jump to

Keyboard shortcuts

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