cm

package
v0.0.0-...-030b38e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRetryInterval = 1 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DelayEvent

type DelayEvent struct {
	Key      interface{}
	Duration time.Duration
	Reason   string
}

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 ReconcileFunc func(key string) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL