core

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScheduleAlgorithm

type ScheduleAlgorithm interface {
	Schedule(context.Context, *policyv1alpha1.Placement, *workv1alpha2.ResourceBindingSpec) (scheduleResult ScheduleResult, err error)
	FailoverSchedule(context.Context, *policyv1alpha1.Placement, *workv1alpha2.ResourceBindingSpec) (scheduleResult ScheduleResult, err error)
}

ScheduleAlgorithm is the interface that should be implemented to schedule a resource to the target clusters.

func NewGenericScheduler

func NewGenericScheduler(
	schedCache cache.Cache,
	plugins []string,
) ScheduleAlgorithm

NewGenericScheduler creates a genericScheduler object.

type ScheduleResult

type ScheduleResult struct {
	SuggestedClusters []workv1alpha2.TargetCluster
}

ScheduleResult includes the clusters selected.

type TargetClustersList added in v0.7.0

type TargetClustersList []workv1alpha2.TargetCluster

TargetClustersList is a slice of TargetCluster that implements sort.Interface to sort by Value.

func (TargetClustersList) Len added in v0.7.0

func (a TargetClustersList) Len() int

func (TargetClustersList) Less added in v0.7.0

func (a TargetClustersList) Less(i, j int) bool

func (TargetClustersList) Swap added in v0.7.0

func (a TargetClustersList) Swap(i, j int)

Jump to

Keyboard shortcuts

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