Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Schedule ¶
func Schedule(log logr.Logger, obj client.Object, params Parameters) (goToNextJob bool, nextTick time.Time, err error)
Schedule calculate the next scheduled run, and whether we've got a run that we haven't processed yet (or anything we missed). If we've missed a run, and we're still within the deadline to start it, we'll need to run a job. time-based and event-driven scheduling can be used in conjunction.
Types ¶
type Parameters ¶ added in v1.0.38
type Parameters struct { // State is the real state of the system. State lifecycle.Classifier // LastScheduleTime is the time the controller last scheduled an object. LastScheduleTime metav1.Time // ScheduleSpec is the scheduling options ScheduleSpec *v1alpha1.TaskSchedulerSpec // ExpectedTime is the evaluation of a timeline distribution defined in the ScheduleSpec. ExpectedTimeline v1alpha1.Timeline // JobName is used a prefix for finding children tasks. // We assume the standard naming pattern Job-Task. JobName string // ScheduledJobs normally points to the next QueuedJobs. // In this case, we use it in conjunction with JobName to find the children's name, // and from that to extract the status of the child. ScheduledJobs int `json:"scheduledJobs,omitempty"` }
Click to show internal directories.
Click to hide internal directories.