Documentation ¶
Index ¶
- Constants
- type Cron
- func (c *Cron) Add(namespacedName types.NamespacedName, patchName, tzs string, job cron.Job) error
- func (c *Cron) ListResourceEntry(namespacedName types.NamespacedName) ResourceEntry
- func (c *Cron) Remove(namespacedName types.NamespacedName, patchName string)
- func (c *Cron) RemoveResourceEntry(namespacedName types.NamespacedName)
- func (c *Cron) Start()
- func (c *Cron) Stop()
- type CronContext
- type CronHPAEvent
- type CronHorizontalPodAutoscaler
- func (cronhpa *CronHorizontalPodAutoscaler) ApplyHPAPatch(patchName string, hpa *autoscalingv2.HorizontalPodAutoscaler) error
- func (cronhpa *CronHorizontalPodAutoscaler) ClearSchedules(ctx context.Context, reconciler *CronHorizontalPodAutoscalerReconciler) error
- func (cronhpa *CronHorizontalPodAutoscaler) CreateOrPatchHPA(ctx context.Context, patchName string, currentTime time.Time, ...) error
- func (cronhpa *CronHorizontalPodAutoscaler) GetCurrentPatchName(ctx context.Context, currentTime time.Time) (string, error)
- func (cronhpa *CronHorizontalPodAutoscaler) NewHPA(patchName string) (*autoscalingv2.HorizontalPodAutoscaler, error)
- func (cronhpa *CronHorizontalPodAutoscaler) ToCompatible() *cronhpav1alpha1.CronHorizontalPodAutoscaler
- func (cronhpa *CronHorizontalPodAutoscaler) ToNamespacedName() types.NamespacedName
- func (cronhpa *CronHorizontalPodAutoscaler) UpdateSchedules(ctx context.Context, reconciler *CronHorizontalPodAutoscalerReconciler) error
- type CronHorizontalPodAutoscalerReconciler
- type CtxValueKey
- type ResourceEntry
Constants ¶
View Source
const MaxScheduleTry = 1000000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cron ¶
type Cron struct {
// contains filtered or unexported fields
}
func (*Cron) Add ¶
func (c *Cron) Add(namespacedName types.NamespacedName, patchName, tzs string, job cron.Job) error
func (*Cron) ListResourceEntry ¶
func (c *Cron) ListResourceEntry(namespacedName types.NamespacedName) ResourceEntry
func (*Cron) RemoveResourceEntry ¶
func (c *Cron) RemoveResourceEntry(namespacedName types.NamespacedName)
type CronContext ¶
type CronContext struct {
// contains filtered or unexported fields
}
func (*CronContext) Run ¶
func (cronctx *CronContext) Run()
type CronHPAEvent ¶
type CronHPAEvent = string
const ( CronHPAEventCreated CronHPAEvent = "Created" CronHPAEventUpdated CronHPAEvent = "Updated" CronHPAEventScheduled CronHPAEvent = "Scheduled" CronHPAEventUnscheduled CronHPAEvent = "Unscheduled" CronHPAEventSkipped CronHPAEvent = "Skipped" CronHPAEventNone CronHPAEvent = "" )
type CronHorizontalPodAutoscaler ¶
type CronHorizontalPodAutoscaler cronhpav1alpha1.CronHorizontalPodAutoscaler
func (*CronHorizontalPodAutoscaler) ApplyHPAPatch ¶
func (cronhpa *CronHorizontalPodAutoscaler) ApplyHPAPatch(patchName string, hpa *autoscalingv2.HorizontalPodAutoscaler) error
func (*CronHorizontalPodAutoscaler) ClearSchedules ¶
func (cronhpa *CronHorizontalPodAutoscaler) ClearSchedules(ctx context.Context, reconciler *CronHorizontalPodAutoscalerReconciler) error
func (*CronHorizontalPodAutoscaler) CreateOrPatchHPA ¶
func (cronhpa *CronHorizontalPodAutoscaler) CreateOrPatchHPA(ctx context.Context, patchName string, currentTime time.Time, reconciler *CronHorizontalPodAutoscalerReconciler) error
func (*CronHorizontalPodAutoscaler) GetCurrentPatchName ¶
func (*CronHorizontalPodAutoscaler) NewHPA ¶
func (cronhpa *CronHorizontalPodAutoscaler) NewHPA(patchName string) (*autoscalingv2.HorizontalPodAutoscaler, error)
func (*CronHorizontalPodAutoscaler) ToCompatible ¶
func (cronhpa *CronHorizontalPodAutoscaler) ToCompatible() *cronhpav1alpha1.CronHorizontalPodAutoscaler
func (*CronHorizontalPodAutoscaler) ToNamespacedName ¶
func (cronhpa *CronHorizontalPodAutoscaler) ToNamespacedName() types.NamespacedName
func (*CronHorizontalPodAutoscaler) UpdateSchedules ¶
func (cronhpa *CronHorizontalPodAutoscaler) UpdateSchedules(ctx context.Context, reconciler *CronHorizontalPodAutoscalerReconciler) error
type CronHorizontalPodAutoscalerReconciler ¶
type CronHorizontalPodAutoscalerReconciler struct { client.Client Recorder record.EventRecorder Cron *Cron }
CronHorizontalPodAutoscalerReconciler reconciles a CronHorizontalPodAutoscaler object
func (*CronHorizontalPodAutoscalerReconciler) SetupWithManager ¶
func (r *CronHorizontalPodAutoscalerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type CtxValueKey ¶
type CtxValueKey string
var ( CtxValueName CtxValueKey = "name" CtxValueNamespace CtxValueKey = "namespace" )
type ResourceEntry ¶
type ResourceEntry map[string]cron.EntryID
Click to show internal directories.
Click to hide internal directories.