Documentation ¶
Overview ¶
Package externaldns implements External DNS controller for Virtual Server.
Index ¶
Constants ¶
const (
// ControllerName is the name of the externaldns controller.
ControllerName = "externaldns"
)
Variables ¶
var KeyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc
KeyFunc creates a key for an API object. The key can be passed to a worker function that processes an object from a queue such as ProcessItem.
Functions ¶
func DefaultItemBasedRateLimiter ¶
func DefaultItemBasedRateLimiter() workqueue.RateLimiter
DefaultItemBasedRateLimiter returns a new rate limiter with base delay of 5 seconds, max delay of 5 minutes.
Types ¶
type BlockingEventHandler ¶
type BlockingEventHandler struct {
WorkFunc func(obj interface{})
}
BlockingEventHandler is an implementation of cache.ResourceEventHandler that simply synchronously calls it's WorkFunc upon calls to OnAdd, OnUpdate or OnDelete.
func (*BlockingEventHandler) Enqueue ¶
func (b *BlockingEventHandler) Enqueue(obj interface{})
Enqueue synchronously adds a key for an object to the workqueue.
func (*BlockingEventHandler) OnAdd ¶
func (b *BlockingEventHandler) OnAdd(obj interface{}, _ bool)
OnAdd synchronously adds a newly created object to the workqueue.
func (*BlockingEventHandler) OnDelete ¶
func (b *BlockingEventHandler) OnDelete(obj interface{})
OnDelete synchronously adds a deleted object to the workqueue.
func (*BlockingEventHandler) OnUpdate ¶
func (b *BlockingEventHandler) OnUpdate(old, newObj interface{})
OnUpdate synchronously adds an updated object to the workqueue.
type ExtDNSController ¶
type ExtDNSController struct {
// contains filtered or unexported fields
}
ExtDNSController represents ExternalDNS controller.
func NewController ¶
func NewController(opts *ExtDNSOpts) *ExtDNSController
NewController takes external dns config and return a new External DNS Controller.
func (*ExtDNSController) AddNewNamespacedInformer ¶
func (c *ExtDNSController) AddNewNamespacedInformer(ns string)
AddNewNamespacedInformer adds watchers for a new namespace
func (*ExtDNSController) RemoveNamespacedInformer ¶
func (c *ExtDNSController) RemoveNamespacedInformer(ns string)
RemoveNamespacedInformer removes watchers for a namespace we are no longer watching
func (*ExtDNSController) Run ¶
func (c *ExtDNSController) Run(stopCh <-chan struct{})
Run sets up the event handlers for types we are interested in, 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.
type ExtDNSOpts ¶
type ExtDNSOpts struct {
// contains filtered or unexported fields
}
ExtDNSOpts represents config required for building the External DNS Controller.
type QueuingEventHandler ¶
type QueuingEventHandler struct {
Queue workqueue.RateLimitingInterface
}
QueuingEventHandler is an implementation of cache.ResourceEventHandler that simply queues objects that are added/updated/deleted.
func (*QueuingEventHandler) Enqueue ¶
func (q *QueuingEventHandler) Enqueue(obj interface{})
Enqueue adds a key for an object to the workqueue.
func (*QueuingEventHandler) OnAdd ¶
func (q *QueuingEventHandler) OnAdd(obj interface{}, _ bool)
OnAdd adds a newly created object to the workqueue.
func (*QueuingEventHandler) OnDelete ¶
func (q *QueuingEventHandler) OnDelete(obj interface{})
OnDelete adds a deleted object to the workqueue for processing.
func (*QueuingEventHandler) OnUpdate ¶
func (q *QueuingEventHandler) OnUpdate(old, newObj interface{})
OnUpdate adds an updated object to the workqueue.