Documentation ¶
Overview ¶
the code is almost from https://github.com/resmoio/kubernetes-event-exporter/blob/master/pkg/kube/watcher.go but we need to change the event.OnUpdate() function to make it work
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EventEnhancer ¶
type EventEnhancer interface { // Enhance is used to modify the event before it is omitted by the exporter Enhance(ctx context.Context, event *kube.EnhancedEvent) }
type EventExporter ¶
type EventExporter interface { // Start starts the event exporter and make sure it can be added to the manager Start(ctx context.Context) error // RegisterEnhancer registers an event enhancer RegisterEnhancer(enhancer EventEnhancer) }
type EventHandler ¶
type EventHandler func(event *kube.EnhancedEvent)
type EventWatcher ¶
type EventWatcher struct {
// contains filtered or unexported fields
}
func NewEventWatcher ¶
func NewEventWatcher(config *rest.Config, namespace string, MaxEventAgeSeconds int64, metricsStore *metrics.Store, fn EventHandler, ) *EventWatcher
func NewMockEventWatcher ¶
func NewMockEventWatcher(MaxEventAgeSeconds int64, metricsStore *metrics.Store) *EventWatcher
func (*EventWatcher) OnAdd ¶
func (e *EventWatcher) OnAdd(obj interface{})
func (*EventWatcher) OnDelete ¶
func (e *EventWatcher) OnDelete(obj interface{})
func (*EventWatcher) OnUpdate ¶
func (e *EventWatcher) OnUpdate(oldObj, newObj interface{})
func (*EventWatcher) Start ¶
func (e *EventWatcher) Start()
func (*EventWatcher) Stop ¶
func (e *EventWatcher) Stop()
Click to show internal directories.
Click to hide internal directories.