// Handle checks event health and notifies if unhealthy
Handle checks event health and notifies if unhealthy
// Handle checks event health and notifies if unhealthy
func (h *EventHandler) Handle(obj interface{}) error {
	event, ok := obj.(*corev1.Event)
	if !ok {
		return fmt.Errorf("handler expects event object, got %t", obj)
	}
	if event.Type == corev1.EventTypeNormal {
		return nil
	}
	payload := h.getPayload(event)
	return h.notifier.Notify(payload)
}
func ( h * EventHandler ) Handle ( obj interface { } ) error { event , ok := obj . ( * corev1 . Event ) if ! ok { return fmt . Errorf ( " " , obj ) } if event . Type == corev1 . EventTypeNormal { return nil } payload := h . getPayload ( event ) return h . notifier . Notify ( payload ) }
Handle checks event health and notifies if unhealthy
Handle checks event health and notifies if unhealthy