schedulingtypes

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: May 6, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RSPKind = "ReplicaSchedulingPreference"
)

Variables

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 GetPluralName(name string) string

func GetResourceKind

func GetResourceKind(obj pkgruntime.Object) string

func OverrideUpdateNeeded added in v0.0.4

func OverrideUpdateNeeded(overridesMap util.OverridesMap, result map[string]int64) bool

func PlacementUpdateNeeded added in v0.0.4

func PlacementUpdateNeeded(names, newNames []string) bool

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 added in v0.0.6

func (p *Plugin) FederatedTypeExists(key string) bool

func (*Plugin) HasSynced

func (p *Plugin) HasSynced() bool

func (*Plugin) Reconcile added in v0.0.6

func (p *Plugin) Reconcile(qualifiedName util.QualifiedName, result map[string]int64) error

func (*Plugin) Start

func (p *Plugin) Start()

func (*Plugin) Stop

func (p *Plugin) Stop()

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 (*ReplicaScheduler) SchedulingKind added in v0.0.8

func (s *ReplicaScheduler) SchedulingKind() string

func (*ReplicaScheduler) Start

func (s *ReplicaScheduler) Start()

func (*ReplicaScheduler) StartPlugin added in v0.0.3

func (s *ReplicaScheduler) StartPlugin(typeConfig typeconfig.Interface) error

func (*ReplicaScheduler) Stop

func (s *ReplicaScheduler) Stop()

func (*ReplicaScheduler) StopPlugin added in v0.0.5

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 added in v0.0.4

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 added in v0.0.4

func GetSchedulingType(kind string) *SchedulingType

Jump to

Keyboard shortcuts

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