Documentation
¶
Index ¶
- func SetDefaultService(rm rm.ResourceManager)
- type Job
- type Service
- func (s *Service) GetJobSummary(id model.JobID, resourcePool rm.ResourcePoolName) (*jobv1.JobSummary, error)
- func (s *Service) GetJobs(resourcePool rm.ResourcePoolName, desc bool, states []jobv1.State) ([]*jobv1.Job, error)
- func (s *Service) RegisterJob(jobID model.JobID, j Job)
- func (s *Service) UnregisterJob(jobID model.JobID)
- func (s *Service) UpdateJobQueue(updates []*jobv1.QueueControl) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultService ¶
func SetDefaultService(rm rm.ResourceManager)
SetDefaultService sets the package-level Default in this package and `jobmanager`.
Types ¶
type Job ¶
type Job interface { ToV1Job() (*jobv1.Job, error) SetJobPriority(priority int) error SetWeight(weight float64) error SetResourcePool(resourcePool string) error ResourcePool() string }
Job is the interface for commands/experiments types that implement the job service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages the job service.
var DefaultService *Service
DefaultService is the global singleton job service.
func (*Service) GetJobSummary ¶
func (s *Service) GetJobSummary(id model.JobID, resourcePool rm.ResourcePoolName) (*jobv1.JobSummary, error)
GetJobSummary returns a summary of the job given an id and resource pool.
func (*Service) GetJobs ¶
func (s *Service) GetJobs( resourcePool rm.ResourcePoolName, desc bool, states []jobv1.State, ) ([]*jobv1.Job, error)
GetJobs returns a list of jobs for a resource pool.
func (*Service) RegisterJob ¶
RegisterJob takes an experiment/command (of interface type Service) and registers it with the job manager's jobByID map.
func (*Service) UnregisterJob ¶
UnregisterJob deletes a job from the jobByID map.
func (*Service) UpdateJobQueue ¶
func (s *Service) UpdateJobQueue(updates []*jobv1.QueueControl) error
UpdateJobQueue sends queue control updates to specific jobs.
Click to show internal directories.
Click to hide internal directories.