Documentation ¶
Index ¶
- Constants
- Variables
- func GetPluralName(name string) string
- func GetResourceKind(obj pkgruntime.Object) string
- func OverrideUpdateNeeded(overridesMap util.OverridesMap, result map[string]int64) bool
- func PlacementUpdateNeeded(names, newNames []string) bool
- func RegisterSchedulingType(kind string, schedulingType SchedulingType)
- func SchedulingTypes() map[string]SchedulingType
- type Plugin
- type ReplicaScheduler
- func (s *ReplicaScheduler) GetSchedulingResult(rsp *fedschedulingv1a1.ReplicaSchedulingPreference, ...) (map[string]int64, error)
- func (s *ReplicaScheduler) HasSynced() bool
- func (s *ReplicaScheduler) ObjectType() pkgruntime.Object
- func (s *ReplicaScheduler) Reconcile(obj pkgruntime.Object, qualifiedName ctlutil.QualifiedName) ctlutil.ReconciliationStatus
- func (s *ReplicaScheduler) SchedulingKind() string
- func (s *ReplicaScheduler) Start()
- func (s *ReplicaScheduler) StartPlugin(typeConfig typeconfig.Interface) error
- func (s *ReplicaScheduler) Stop()
- func (s *ReplicaScheduler) StopPlugin(kind string)
- type Scheduler
- type SchedulerEventHandlers
- type SchedulerFactory
- type SchedulingType
Constants ¶
View Source
const (
RSPKind = "ReplicaSchedulingPreference"
)
Variables ¶
View Source
var (
Pod = GetResourceKind(&corev1.Pod{})
)
View Source
var PodResource = &metav1.APIResource{ Name: GetPluralName(Pod), Group: corev1.SchemeGroupVersion.Group, Version: corev1.SchemeGroupVersion.Version, Kind: Pod, Namespaced: true, }
Functions ¶
func GetPluralName ¶
func GetResourceKind ¶
func GetResourceKind(obj pkgruntime.Object) string
func OverrideUpdateNeeded ¶
func OverrideUpdateNeeded(overridesMap util.OverridesMap, result map[string]int64) bool
func PlacementUpdateNeeded ¶
These assume that there would be no duplicate clusternames
func RegisterSchedulingType ¶
func RegisterSchedulingType(kind string, schedulingType SchedulingType)
func SchedulingTypes ¶
func SchedulingTypes() map[string]SchedulingType
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func NewPlugin ¶
func NewPlugin(controllerConfig *util.ControllerConfig, eventHandlers SchedulerEventHandlers, typeConfig typeconfig.Interface) (*Plugin, error)
func (*Plugin) FederatedTypeExists ¶
type ReplicaScheduler ¶
type ReplicaScheduler struct {
// contains filtered or unexported fields
}
func (*ReplicaScheduler) GetSchedulingResult ¶
func (s *ReplicaScheduler) GetSchedulingResult(rsp *fedschedulingv1a1.ReplicaSchedulingPreference, qualifiedName ctlutil.QualifiedName, clusterNames []string) (map[string]int64, error)
func (*ReplicaScheduler) HasSynced ¶
func (s *ReplicaScheduler) HasSynced() bool
func (*ReplicaScheduler) ObjectType ¶
func (s *ReplicaScheduler) ObjectType() pkgruntime.Object
func (*ReplicaScheduler) Reconcile ¶
func (s *ReplicaScheduler) Reconcile(obj pkgruntime.Object, qualifiedName ctlutil.QualifiedName) ctlutil.ReconciliationStatus
func (*ReplicaScheduler) SchedulingKind ¶
func (s *ReplicaScheduler) SchedulingKind() string
func (*ReplicaScheduler) Start ¶
func (s *ReplicaScheduler) Start()
func (*ReplicaScheduler) StartPlugin ¶
func (s *ReplicaScheduler) StartPlugin(typeConfig typeconfig.Interface) error
func (*ReplicaScheduler) Stop ¶
func (s *ReplicaScheduler) Stop()
func (*ReplicaScheduler) StopPlugin ¶
func (s *ReplicaScheduler) StopPlugin(kind string)
type Scheduler ¶
type Scheduler interface { SchedulingKind() string ObjectType() pkgruntime.Object Start() HasSynced() bool Stop() Reconcile(obj pkgruntime.Object, qualifiedName QualifiedName) ReconciliationStatus StartPlugin(typeConfig typeconfig.Interface) error StopPlugin(kind string) }
func NewReplicaScheduler ¶
func NewReplicaScheduler(controllerConfig *ctlutil.ControllerConfig, eventHandlers SchedulerEventHandlers) (Scheduler, error)
type SchedulerEventHandlers ¶
type SchedulerEventHandlers struct { FederationEventHandler func(pkgruntime.Object) ClusterEventHandler func(pkgruntime.Object) ClusterLifecycleHandlers *ClusterLifecycleHandlerFuncs }
type SchedulerFactory ¶
type SchedulerFactory func(controllerConfig *ControllerConfig, eventHandlers SchedulerEventHandlers) (Scheduler, error)
type SchedulingType ¶
type SchedulingType struct { Kind string SchedulerFactory SchedulerFactory }
func GetSchedulingType ¶
func GetSchedulingType(kind string) *SchedulingType
Click to show internal directories.
Click to hide internal directories.