Documentation ¶
Index ¶
- Constants
- type DelayEvent
- type ReconcileFunc
- type ResyncController
- type WorkqueueController
- func (ctl *WorkqueueController) OnAdd(obj interface{})
- func (ctl *WorkqueueController) OnDelete(obj interface{})
- func (ctl *WorkqueueController) OnUpdate(oldObj, newObj interface{})
- func (ctl *WorkqueueController) Run()
- func (ctl *WorkqueueController) WithClusterName(clusterName string) *WorkqueueController
Constants ¶
View Source
const (
DefaultRetryInterval = 1 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelayEvent ¶
DelayEvent The controller delays the event. When the controller encounters this event, it will enable the delay queue to assist some tasks that need to be processed
func NewDelayEvent ¶
func NewDelayEvent(key interface{}, duration time.Duration, reason string) *DelayEvent
func (*DelayEvent) Error ¶
func (event *DelayEvent) Error() string
func (*DelayEvent) String ¶
func (event *DelayEvent) String() string
type ReconcileFunc ¶
type ResyncController ¶
type ResyncController struct { *WorkqueueController // contains filtered or unexported fields }
ResyncController is a controller that resyncs periodically.
func NewResyncController ¶
func NewResyncController(name string, workerNum int, informer cache.SharedIndexInformer, reconcile ReconcileFunc) *ResyncController
NewResyncController Run starts the controller. it can custom the resync period.
func (*ResyncController) RunWithResync ¶
func (resync *ResyncController) RunWithResync(resyncPeriod time.Duration)
type WorkqueueController ¶
type WorkqueueController struct { Name string ClusterName string WorkerNum int Queue workqueue.RateLimitingInterface Reconcile ReconcileFunc // contains filtered or unexported fields }
func NewWorkqueueController ¶
func NewWorkqueueController(name string, workerNum int, reconcile ReconcileFunc) *WorkqueueController
func (*WorkqueueController) OnAdd ¶
func (ctl *WorkqueueController) OnAdd(obj interface{})
func (*WorkqueueController) OnDelete ¶
func (ctl *WorkqueueController) OnDelete(obj interface{})
func (*WorkqueueController) OnUpdate ¶
func (ctl *WorkqueueController) OnUpdate(oldObj, newObj interface{})
func (*WorkqueueController) Run ¶
func (ctl *WorkqueueController) Run()
func (*WorkqueueController) WithClusterName ¶
func (ctl *WorkqueueController) WithClusterName(clusterName string) *WorkqueueController
Click to show internal directories.
Click to hide internal directories.