func (gs *StdoutSink) UpdateEvents(eNew *v1.Event, eOld *v1.Event) {
	eData := NewEventData(eNew, eOld)
	if len(gs.namespace) > 0 {
		namespacedData := map[string]interface{}{}
		namespacedData[gs.namespace] = eData
		if eJSONBytes, err := json.Marshal(namespacedData); err == nil {
			fmt.Println(string(eJSONBytes))
		} else {
			fmt.Fprintf(os.Stderr, "Failed to json serialize event: %v", err)
		}
	} else {
		if eJSONBytes, err := json.Marshal(eData); err == nil {
			fmt.Println(string(eJSONBytes))
		} else {
			fmt.Fprintf(os.Stderr, "Failed to json serialize event: %v", err)
		}
	}
}
UpdateEvents implements the EventSinkInterface
package sinks
import (
	"encoding/json"
	"fmt"
	"os"
	"k8s.io/api/core/v1"
)
type StdoutSink struct {
	namespace string
}
func NewStdoutSink(namespace string) EventSinkInterface {
	return &StdoutSink{
		namespace: namespace}
}