Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Operator ¶
type Operator struct { OpClient operatorclient.ClientInterface Log *logrus.Logger // contains filtered or unexported fields }
An Operator is a collection of QueueInformers OpClient is used to establish the connection to kubernetes
func NewOperator ¶
func NewOperator(kubeconfig string, logger *logrus.Logger, queueInformers ...*QueueInformer) (*Operator, error)
NewOperator creates a new Operator configured to manage the cluster defined in kubeconfig.
func NewOperatorFromClient ¶
func NewOperatorFromClient(opClient operatorclient.ClientInterface, logger *logrus.Logger, queueInformers ...*QueueInformer) (*Operator, error)
func (*Operator) RegisterInformer ¶
func (o *Operator) RegisterInformer(informer cache.SharedIndexInformer)
RegisterInformer adds an Informer to this operator
func (*Operator) RegisterQueueInformer ¶
func (o *Operator) RegisterQueueInformer(queueInformer *QueueInformer)
RegisterQueueInformer adds a QueueInformer to this operator
type QueueInformer ¶
type QueueInformer struct { metrics.MetricsProvider // contains filtered or unexported fields }
QueueInformer ties an informer to a queue in order to process events from the informer the informer watches objects of interest and adds objects to the queue for processing the syncHandler is called for all objects on the queue
func New ¶
func New(queue workqueue.RateLimitingInterface, informers []cache.SharedIndexInformer, handler SyncHandler, funcs *cache.ResourceEventHandlerFuncs, name string, metrics metrics.MetricsProvider, logger *logrus.Logger) []*QueueInformer
New creates a set of new queueinformers given a name, a set of informers, and a sync handler to handle the objects that the operator is managing. Optionally, custom event handler funcs can be passed in (defaults will be provided)
func NewInformer ¶
func NewInformer(queue workqueue.RateLimitingInterface, informer cache.SharedIndexInformer, handler SyncHandler, funcs *cache.ResourceEventHandlerFuncs, name string, metrics metrics.MetricsProvider, logger *logrus.Logger) *QueueInformer
NewInformer creates a new queueinformer given a name, an informer, and a sync handler to handle the objects that the operator is managing. Optionally, custom event handler funcs can be passed in (defaults will be provided)
type ResourceQueueSet ¶
type ResourceQueueSet map[string]workqueue.RateLimitingInterface
func (ResourceQueueSet) Remove ¶
func (r ResourceQueueSet) Remove(name, namespace string) error
func (ResourceQueueSet) Requeue ¶
func (r ResourceQueueSet) Requeue(name, namespace string) error
type SyncHandler ¶
type SyncHandler func(obj interface{}) error
SyncHandler is the function that reconciles the controlled object when seen