Documentation ¶
Index ¶
- func InitLogger(appName string) log.Logger
- func ScheduleTrogdorTasks(logger log.Logger, taskSpecs []trogdor.TaskSpec, trogdorCoordinatorHost string)
- func ShuffleSlice(vals []string) []string
- func StringSliceContains(list []string, element string) bool
- func TimeToUnixMilli(t time.Time) uint64
- func TrogdorAgentPodNames(trogdorAgentsCount int) []string
- type Duration
- type SchedulableJob
- type Scheduler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶
func ScheduleTrogdorTasks ¶
func ScheduleTrogdorTasks(logger log.Logger, taskSpecs []trogdor.TaskSpec, trogdorCoordinatorHost string)
Creates the passed in Trogdor tasks by calling the Trogdor Coordinator REST API
func StringSliceContains ¶
func TimeToUnixMilli ¶
func TrogdorAgentPodNames ¶
returns a slice of the Trogdor agent pod names
Types ¶
type SchedulableJob ¶
type SchedulableJob struct { Name string Duration time.Duration DelayDuration time.Duration // contains filtered or unexported fields }
func (*SchedulableJob) RunUntilEndOf ¶
func (j *SchedulableJob) RunUntilEndOf(jobs []*SchedulableJob) error
RunUntilEndOf() schedules a job J to run until the latest endTime of all the given jobs
func (*SchedulableJob) ScheduleAfterJobEnd ¶
func (j *SchedulableJob) ScheduleAfterJobEnd(jobs []*SchedulableJob) error
func (*SchedulableJob) ScheduleAfterJobStart ¶
func (j *SchedulableJob) ScheduleAfterJobStart(jobs []*SchedulableJob) error
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func (*Scheduler) AddJob ¶
func (s *Scheduler) AddJob(job *SchedulableJob)
func (*Scheduler) JobTimes ¶
func (s *Scheduler) JobTimes(jobName string) (startTime time.Time, duration time.Duration, endTime time.Time, err error)
JobTimes() returns the time a job should start, its duration and the time at which it should end it is an error to call this function if the given job has not been added to the Scheduler and Scheduler#Schedule() has not been called
Click to show internal directories.
Click to hide internal directories.