Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // AddRateLimited adds item to queue. AddRateLimited(item interface{}) // EnqueueRateLimited generates the key for objects then adds the key as an item to queue. EnqueueRateLimited(obj runtime.Object) Run(workerNumber int, stopChan <-chan struct{}) }
Interface is a worker to process resources periodic with a rateLimitingQueue.
type KeyFunc ¶
KeyFunc knows how to make a key from an object. Implementations should be deterministic.
type QueueKey ¶
type QueueKey interface{}
QueueKey is the item key that stores in queue. The key could be arbitrary types.
In some cases, people would like store different resources in a same queue, the traditional full-qualified key, such as '<namespace>/<name>', can't distinguish which resource the key belongs to, the key might carry more information of a resource, such as GVK(Group Version Kind), in that cases people need to use self-defined key, e.g. a struct.
type ReconcileFunc ¶
ReconcileFunc knows how to consume items(key) from the queue.