Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultJobParser ¶
type DefaultJobParser struct { }
DefaultJobParser implement a basic JobParser.
func (*DefaultJobParser) NewTrainingJob ¶
func (p *DefaultJobParser) NewTrainingJob(job *paddlev1.TrainingJob) (*paddlev1.TrainingJob, error)
NewTrainingJob generates a whole structure of TrainingJob
type Labels ¶
Labels represents labels of k8s resources
func (Labels) LabelsParser ¶
LabelsParser parse labels to selector
type TrainingJobUpdater ¶
type TrainingJobUpdater struct {
// contains filtered or unexported fields
}
TrainingJobUpdater is used to manage a specific TrainingJob
func NewUpdater ¶
func NewUpdater(job *padv1.TrainingJob, kubeClient kubernetes.Interface, trainingJobClient trainingJobClient.Interface) (*TrainingJobUpdater, error)
NewUpdater creates a new TrainingJobUpdater and start a goroutine to control current job.
func (*TrainingJobUpdater) Convert ¶
func (updater *TrainingJobUpdater) Convert()
Convert is main process to convert TrainingJob to desire status.
func (*TrainingJobUpdater) Delete ¶
func (updater *TrainingJobUpdater) Delete()
Delete send a delete event to updater, updater will kill the trainingjob and clear all the resource of the trainingjob.
func (*TrainingJobUpdater) GetStatus ¶
func (updater *TrainingJobUpdater) GetStatus() (*padv1.TrainingJobStatus, error)
GetStatus get TrainingJob status from trainers.
func (*TrainingJobUpdater) InitResource ¶
func (updater *TrainingJobUpdater) InitResource()
InitResource is used to parse trainingJob and create trainingJob resources.
func (*TrainingJobUpdater) Modify ¶
func (updater *TrainingJobUpdater) Modify(nj *padv1.TrainingJob)
Modify send a modify event to updater. updater will processing according to the situation.