Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SuccessSynced is used as part of the Event 'reason' when a Foo is synced SuccessSynced = "Synced" // FailedSynced is used as part of the Event 'reason' when a Foo is not synced FailedSynced = "FailedSync" // is synced successfully MessageResourceSynced = "Synced successfully" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseController ¶
type BaseController struct { // Workers will wait informer caches to be synced Synced []cache.InformerSynced // Workqueue is a rate limited work queue. Workqueue workqueue.RateLimitingInterface Handler func(key string) error MaxRetries int Name string }
BaseController provides a Controller template for watching a primary resources that defined as CRD.
func (*BaseController) Enqueue ¶
func (c *BaseController) Enqueue(obj interface{})
Enqueue takes a primary resource and converts it into a namespace/name string which is then put onto the work queue. This method should *not* be passed resources of any type other than primary resource.
func (*BaseController) Run ¶
func (c *BaseController) Run(threadiness int, stopCh <-chan struct{}) error
Run will set up the event handlers for Primary resource, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.
Click to show internal directories.
Click to hide internal directories.