Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NoFutureWindows = errors.New("no future windows")
NoFutureWindows error can be used by a caller to detect that there are no maintenance windows available.
Functions ¶
func HasValidTimeRanges ¶
func HasValidTimeRanges(mw *commonv1alpha1.MaintenanceWindowSpec) bool
HasValidTimeRanges validates that there are non-zero time-ranges and all time-ranges specified are valid.
func InRange ¶
func InRange(mw *commonv1alpha1.MaintenanceWindowSpec, t time.Time) bool
InRange returns true iff the specified time is in any one of the time ranges.
func NextWindow ¶
func NextWindow(mw *commonv1alpha1.MaintenanceWindowSpec, t time.Time) (*time.Time, *time.Duration, error)
NextWindow returns the start time of the current or next maintenance window, coupled with the duration of that window. If no future windows are available, NoFutureWindows error is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.