Documentation ¶
Index ¶
- type Dependencies
- type GaiaScheduler
- type Scheduler
- func (s *Scheduler) CountScheduledRuns() int
- func (s *Scheduler) GetFreeWorkers() int32
- func (s *Scheduler) Init()
- func (s *Scheduler) SchedulePipeline(p *gaia.Pipeline, startedReason string, args []*gaia.Argument) (*gaia.PipelineRun, error)
- func (s *Scheduler) SetPipelineJobs(p *gaia.Pipeline) error
- func (s *Scheduler) StopPipelineRun(p *gaia.Pipeline, runID int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependencies ¶
type Dependencies struct { Store store.GaiaStore DB memdb.GaiaMemDB PS plugin.Plugin CA security.CAAPI Vault security.GaiaVault }
Dependencies defines the dependencies of the scheduler service.
type GaiaScheduler ¶
type GaiaScheduler interface { Init() SchedulePipeline(p *gaia.Pipeline, startedBy string, args []*gaia.Argument) (*gaia.PipelineRun, error) SetPipelineJobs(p *gaia.Pipeline) error StopPipelineRun(p *gaia.Pipeline, runID int) error GetFreeWorkers() int32 CountScheduledRuns() int }
GaiaScheduler is a job scheduler for gaia pipeline runs.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler represents the schuler object
func NewScheduler ¶
func NewScheduler(deps Dependencies) (*Scheduler, error)
NewScheduler creates a new Scheduler service.
func (*Scheduler) CountScheduledRuns ¶
CountScheduledRuns returns the number of scheduled runs.
func (*Scheduler) GetFreeWorkers ¶
GetFreeWorkers returns the number of free workers.
func (*Scheduler) SchedulePipeline ¶
func (s *Scheduler) SchedulePipeline(p *gaia.Pipeline, startedReason string, args []*gaia.Argument) (*gaia.PipelineRun, error)
SchedulePipeline schedules a pipeline. We create a new schedule object and save it in our store. The scheduler will later pick this up and will continue the work.
func (*Scheduler) SetPipelineJobs ¶
SetPipelineJobs uses the plugin system to get all jobs from the given pipeline. This function is blocking and might take some time.
Click to show internal directories.
Click to hide internal directories.