 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var InvalidJobID = JobID(0)
    Functions ¶
This section is empty.
Types ¶
type JobConfig ¶
type JobConfig struct {
	// Name is a human readable name for the job for use in logging
	Name string
	// Tasks is a list of tasks the job performs
	Tasks []string
	// Job is the job that will be executed.
	Job Job
	// Locker is an optional lock that must be taken before the job can execute.
	Locker Locker
	// RestartOnFailure controls whether the job should be restarted if it stops with an error.
	RestartOnFailure bool
	// RestartOnCompletion controls whether the job should be restarted if it stops without an error.
	RestartOnCompletion bool
	// RestartDelay is the amount of time to wait before restarting a stopped job
	RestartDelay time.Duration
	// Type is a human readable type for the job for use in logging.
	Type string
	// Params is a map of additional parameters that add human readable context to the job.
	Params map[string]string
	// StartedAt is the time the job started running.
	StartedAt time.Time
	// EndedAt is the time the job stopped running, either through successful completion or failure. Reset if job is restarted.
	EndedAt time.Time
	// contains filtered or unexported fields
}
    type JobListResult ¶ added in v0.8.2
type JobSubmitResult ¶ added in v0.8.2
type Scheduler ¶
type Scheduler struct {
	// contains filtered or unexported fields
}
    func NewScheduler ¶
func NewSchedulerDaemon ¶
func NewSchedulerDaemon(mctx helpers.MetricsCtx, lc fx.Lifecycle) *Scheduler
func (*Scheduler) Jobs ¶
func (s *Scheduler) Jobs() []JobListResult
func (*Scheduler) Submit ¶
func (s *Scheduler) Submit(jc *JobConfig) *JobSubmitResult
 Click to show internal directories. 
   Click to hide internal directories.