gang_schedule

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendOwnerReference

func AppendOwnerReference(obj metav1.Object, newReference metav1.OwnerReference)

Types

type GangScheduler

type GangScheduler interface {
	// CreateGang creates a new gang entity to submit one scheduling process, with specified
	// minNumber and select batch of pods by single or multiple label selector. The
	// implementation should handle the relative relationship between job, pod and gang
	// entity.
	CreateGang(job metav1.Object, replicas map[apiv1.ReplicaType]*apiv1.ReplicaSpec) (runtime.Object, error)

	// BindPodToGang binds a object with named gang entity object.
	BindPodToGang(obj metav1.Object, entity runtime.Object) error

	// GetGang get gang entity instance from cluster by name and namespace.
	GetGang(name types.NamespacedName) (runtime.Object, error)

	// DeleteGang deletes gang entity object from cluster and finish corresponding gang
	// scheduling process.
	DeleteGang(name types.NamespacedName) error

	// Name of gang scheduler.
	Name() string
}

GangScheduler describe a abstract gang scheduler to implement job gang scheduling, this interface discards the details of different scheduler implementations and call the intermediate object GangEntity, represented by runtime.Object.

type NewGangScheduler

type NewGangScheduler func(mgr controllerruntime.Manager) GangScheduler

NewGangScheduler receive a client as init parameter and return a new gang scheduler.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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