scheduler

package
v0.0.0-...-405ae51 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface{}

Config defines the configuration of a batch scheduler.

type Factory

type Factory func(config Config) (Interface, error)

Factory defines the factory of a batch scheduler.

type Interface

type Interface interface {
	Name() string
	ShouldSchedule(app *v1beta2.SparkApplication) bool
	Schedule(app *v1beta2.SparkApplication) error
	Cleanup(app *v1beta2.SparkApplication) error
}

Interface defines the interface of a batch scheduler.

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry is a registry of scheduler factories.

func GetRegistry

func GetRegistry() *Registry

func (*Registry) GetRegisteredSchedulerNames

func (r *Registry) GetRegisteredSchedulerNames() []string

GetRegisteredSchedulerNames gets the registered scheduler names.

func (*Registry) GetScheduler

func (r *Registry) GetScheduler(name string, config Config) (Interface, error)

func (*Registry) Register

func (r *Registry) Register(name string, factory Factory) error

RegisterScheduler registers a scheduler to the manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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