Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DuplicatedStrategy indicates each candidate member cluster will directly apply the original replicas. DuplicatedStrategy = "Duplicated" // AggregatedStrategy indicates dividing replicas among clusters as few as possible and // taking clusters' available replicas into consideration as well. AggregatedStrategy = "Aggregated" // StaticWeightStrategy indicates dividing replicas by static weight according to WeightPreference. StaticWeightStrategy = "StaticWeight" // DynamicWeightStrategy indicates dividing replicas by dynamic weight according to WeightPreference. DynamicWeightStrategy = "DynamicWeight" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScheduleAlgorithm ¶
type ScheduleAlgorithm interface {
Schedule(context.Context, *workv1alpha2.ResourceBindingSpec, *workv1alpha2.ResourceBindingStatus, *ScheduleAlgorithmOption) (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, registry runtime.Registry, ) (ScheduleAlgorithm, error)
NewGenericScheduler creates a genericScheduler object.
type ScheduleAlgorithmOption ¶ added in v1.3.0
type ScheduleAlgorithmOption struct {
EnableEmptyWorkloadPropagation bool
}
ScheduleAlgorithmOption represents the option for ScheduleAlgorithm.
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)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.