Documentation ¶
Overview ¶
Package recorder implements a simple library for sending event to k8s
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { Errorf(format string, args ...interface{}) Infof(format string, args ...interface{}) }
Logger is hmm... for logging.
type NoOpLogger ¶
type NoOpLogger struct{}
NoOpLogger is used when no logger is provided
func (NoOpLogger) Errorf ¶
func (n NoOpLogger) Errorf(format string, args ...interface{})
Errorf does nothing
func (NoOpLogger) Infof ¶
func (n NoOpLogger) Infof(format string, args ...interface{})
Infof does nothing
type SimpleRecorder ¶
SimpleRecorder is simple goroutine based recorder for events
func New ¶
func New(sink record.EventSink, scheme *runtime.Scheme, source v1.EventSource, lg Logger) *SimpleRecorder
New is a simple constructor for SimpleRecorder
func (*SimpleRecorder) Eventf ¶
func (sr *SimpleRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{})
Eventf generate events with for formatted message
func (*SimpleRecorder) LabeledEventf ¶
func (sr *SimpleRecorder) LabeledEventf(object runtime.Object, labels map[string]string, eventtype, reason, messageFmt string, args ...interface{})
LabeledEventf generate events with for formatted message and labels
Click to show internal directories.
Click to hide internal directories.