Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GaiaScheduler ¶
type GaiaScheduler interface { Init() error SchedulePipeline(p *gaia.Pipeline, args []gaia.Argument) (*gaia.PipelineRun, error) SetPipelineJobs(p *gaia.Pipeline) error StopPipelineRun(p *gaia.Pipeline, runID int) error }
GaiaScheduler is a job scheduler for gaia pipeline runs.
type Plugin ¶
type Plugin interface { // NewPlugin creates a new instance of plugin NewPlugin(ca security.CAAPI) Plugin // Init initializes the go-plugin client and generates a // new certificate pair for gaia and the plugin/pipeline. Init(command *exec.Cmd, logPath *string) error // Validate validates the plugin interface. Validate() error // Execute executes one job of a pipeline. Execute(j *gaia.Job) error // GetJobs returns all real jobs from the pipeline. GetJobs() ([]gaia.Job, error) // FlushLogs flushes the logs. FlushLogs() error // Close closes the connection and cleansup open file writes. Close() }
Plugin represents the plugin implementation which is used during scheduling and execution.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler represents the schuler object
func NewScheduler ¶
func NewScheduler(store store.GaiaStore, pS Plugin, ca security.CAAPI, vault security.VaultAPI) *Scheduler
NewScheduler creates a new instance of Scheduler.
func (*Scheduler) SchedulePipeline ¶
func (s *Scheduler) SchedulePipeline(p *gaia.Pipeline, 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.