Documentation ¶
Overview ¶
Kubernetes controller boilerplate.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHandler ¶
func AddHandler(informer cache.SharedIndexInformer, kind string) workqueue.RateLimitingInterface
AddHandler creates and adds an event handler to the informer. It returns the queue associated to the event handler.
func NewEventHandler ¶
func NewEventHandler(kind string, queue workqueue.Interface) cache.ResourceEventHandler
NewEventHandler creates an event handler which just adds events to the given queue.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller describes a controller to watch the given GVK events.
func NewController ¶
func NewController(gvk schema.GroupVersionKind, informer cache.SharedIndexInformer, handler Handler) *Controller
NewController creates a controller.
func (*Controller) GetQueue ¶
func (c *Controller) GetQueue() workqueue.Interface
GetQueue returns the event queue used by the controller. It can be useful to inject extra events for the controller. See pkg/converter/endpoints/controller.go for an example.
Click to show internal directories.
Click to hide internal directories.