Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventData ¶
type EventData struct { Verb string `json:"verb"` Event *v1.Event `json:"event"` OldEvent *v1.Event `json:"old_event,omitempty"` }
EventData encodes an eventrouter event and previous event, with a verb for whether the event is created or updated.
func NewEventData ¶
NewEventData constructs an EventData struct from an old and new event, setting the verb accordingly
func (*EventData) WriteFlattenedJSON ¶
WriteFlattenedJSON writes the json to the file in the below format 1) Flattens the json into a not nested key:value 2) Convert the json into snake format Eg: {"event_involved_object_kind":"pod", "event_metadata_namespace":"kube-system"}
type EventSinkInterface ¶
EventSinkInterface is the interface used to shunt events
func ManufactureSink ¶
func ManufactureSink() (e EventSinkInterface)
ManufactureSink will manufacture a sink according to viper configs TODO: Determine if it should return an array of sinks
func NewStdoutSink ¶
func NewStdoutSink(namespace string) EventSinkInterface
NewStdoutSink will create a new StdoutSink with default options, returned as an EventSinkInterface
type StdoutSink ¶
type StdoutSink struct {
// contains filtered or unexported fields
}
StdoutSink is the other basic sink By default, Fluentd/ElasticSearch won't index glog formatted lines By logging raw JSON to stdout, we will get automated indexing which can be queried in Kibana.
func (*StdoutSink) UpdateEvents ¶
func (gs *StdoutSink) UpdateEvents(eNew *v1.Event, eOld *v1.Event)
UpdateEvents implements the EventSinkInterface