Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRecorder ¶
func NewRecorder(event typedcorev1.EventInterface) (record.EventRecorder, error)
NewRecorder returns an EventRecorder type that can be used to post Events to different object's lifecycles. The returned recorder includes nil checks to prevent panics from invalid objects.
Types ¶
type SafeEventRecorder ¶ added in v0.39.0
type SafeEventRecorder struct {
// contains filtered or unexported fields
}
SafeEventRecorder wraps record.EventRecorder with nil checks to prevent panics when recording events for objects with nil or invalid metadata.
func (*SafeEventRecorder) AnnotatedEventf ¶ added in v0.39.0
func (s *SafeEventRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{})
AnnotatedEventf records a formatted event with annotations for the given object, with nil checks.
Click to show internal directories.
Click to hide internal directories.