Documentation
¶
Index ¶
- func ClusterResourceIDHashToScheduleWithinPercent(resourceID string) float64
- func IsValid(t time.Time, sched calendar) bool
- func NewService(env env.Interface, log *logrus.Entry, dbg schedulerDBs, m metrics.Emitter) *service
- func Next(now time.Time, sched calendar) (time.Time, bool)
- func ParseCalendar(s string) (cal calendar, reterr error)
- func PercentWithinPeriod(percent float64, scheduleWithin time.Duration) time.Duration
- func ToSelectorData(doc *api.OpenShiftClusterDocument, subscriptionState string) (selectorData, error)
- type Runnable
- type Scheduler
- type SelectorDataKey
- type SelectorDataType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterResourceIDHashToScheduleWithinPercent ¶
Take a cluster resource ID and deterministically turn it into a % to be used for placing the cluster in the "scheduleAcross". For example, 0.0 will mean that it will be scheduled exactly at the schedule time, 1.0 will mean scheduled at schedule time + scheduleAcross.
func NewService ¶
func ParseCalendar ¶
func PercentWithinPeriod ¶
Given a period and a float from 0.0-1.0, calculate the target time within that duration rounded to the second.
func ToSelectorData ¶
func ToSelectorData(doc *api.OpenShiftClusterDocument, subscriptionState string) (selectorData, error)
Types ¶
type Scheduler ¶
type Scheduler interface {
Process(context.Context) (bool, error)
AddMaintenanceTasks(map[api.MIMOTaskID]tasks.MaintenanceTask)
}
type SelectorDataKey ¶
type SelectorDataKey string
const ( SelectorDataKeyResourceID SelectorDataKey = "resourceID" SelectorDataKeyBucketID SelectorDataKey = "bucketID" SelectorDataKeySubscriptionID SelectorDataKey = "subscriptionID" SelectorDataKeySubscriptionState SelectorDataKey = "subscriptionState" SelectorDataKeyAuthenticationType SelectorDataKey = "authenticationType" SelectorDataArchitectureVersion SelectorDataKey = "architectureVersion" SelectorDataProvisioningState SelectorDataKey = "provisioningState" SelectorDataOutboundType SelectorDataKey = "outboundType" SelectorDataAPIServerVisibility SelectorDataKey = "APIServerVisibility" SelectorDataIsManagedDomain SelectorDataKey = "isManagedDomain" )
type SelectorDataType ¶
type SelectorDataType string
const ( SelectorDataTypeString SelectorDataType = "string" SelectorDataTypeDate SelectorDataType = "date" )
Click to show internal directories.
Click to hide internal directories.