Documentation ¶
Index ¶
- type CTX_VALUE_KEY
- type Cron
- type CronContext
- type CronItem
- type GlobalCronContext
- type LendingConfig
- func (config *LendingConfig) ActivateTargetResources(ctx context.Context, reconciler *LendingConfigReconciler) error
- func (config *LendingConfig) ClearSchedules(ctx context.Context, reconciler *LendingConfigReconciler) error
- func (config *LendingConfig) DeactivateTargetResources(ctx context.Context, reconciler *LendingConfigReconciler) ([]v1alpha1.LendingReference, error)
- func (config *LendingConfig) ToCompatible() *clusterlendingmanagerv1alpha1.LendingConfig
- func (config *LendingConfig) ToNamespacedName() types.NamespacedName
- func (config *LendingConfig) UpdateSchedules(ctx context.Context, reconciler *LendingConfigReconciler) error
- type LendingConfigEvent
- type LendingConfigReconciler
- type LendingEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CTX_VALUE_KEY ¶
type CTX_VALUE_KEY string
var ( CTX_VALUE_NAME CTX_VALUE_KEY = "name" CTX_VALUE_NAMESPACE CTX_VALUE_KEY = "namespace" )
type Cron ¶
type Cron struct {
// contains filtered or unexported fields
}
func (*Cron) Add ¶
func (c *Cron) Add(namespacedName types.NamespacedName, cronItems []CronItem) error
func (*Cron) Clear ¶
func (c *Cron) Clear(namespacedName types.NamespacedName)
type CronContext ¶
type CronContext struct {
// contains filtered or unexported fields
}
func NewCronContext ¶
func NewCronContext( reconciler *LendingConfigReconciler, lendingConfig *LendingConfig, event LendingEvent, ) *CronContext
func (*CronContext) Run ¶
func (cronctx *CronContext) Run()
type GlobalCronContext ¶ added in v0.0.3
type GlobalCronContext struct {
// contains filtered or unexported fields
}
type LendingConfig ¶
type LendingConfig clusterlendingmanagerv1alpha1.LendingConfig
func (*LendingConfig) ActivateTargetResources ¶ added in v0.0.4
func (config *LendingConfig) ActivateTargetResources(ctx context.Context, reconciler *LendingConfigReconciler) error
func (*LendingConfig) ClearSchedules ¶
func (config *LendingConfig) ClearSchedules(ctx context.Context, reconciler *LendingConfigReconciler) error
func (*LendingConfig) DeactivateTargetResources ¶ added in v0.0.4
func (config *LendingConfig) DeactivateTargetResources(ctx context.Context, reconciler *LendingConfigReconciler) ([]v1alpha1.LendingReference, error)
func (*LendingConfig) ToCompatible ¶
func (config *LendingConfig) ToCompatible() *clusterlendingmanagerv1alpha1.LendingConfig
func (*LendingConfig) ToNamespacedName ¶
func (config *LendingConfig) ToNamespacedName() types.NamespacedName
func (*LendingConfig) UpdateSchedules ¶
func (config *LendingConfig) UpdateSchedules(ctx context.Context, reconciler *LendingConfigReconciler) error
type LendingConfigEvent ¶
type LendingConfigEvent = string
const ( SchedulesUpdated LendingConfigEvent = "SchedulesUpdated" SchedulesCleared LendingConfigEvent = "SchedulesCleared" LendingStarted LendingConfigEvent = "LendingStarted" LendingEnded LendingConfigEvent = "endingEnded" )
type LendingConfigReconciler ¶
type LendingConfigReconciler struct { client.Client Recorder record.EventRecorder Cron *Cron }
LendingConfigReconciler reconciles a LendingConfig object
func (*LendingConfigReconciler) Reconcile ¶
func (r *LendingConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the LendingConfig object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.0/pkg/reconcile
func (*LendingConfigReconciler) SetupWithManager ¶
func (r *LendingConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type LendingEvent ¶
type LendingEvent string
const ( LendingStart LendingEvent = "LendingStart" LendingEnd LendingEvent = "LendingEnd" )
Click to show internal directories.
Click to hide internal directories.