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
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() EventSinkInterface
NewStdoutSink will create a new StdoutSink with default options, returned as an EventSinkInterface
type GlogSink ¶
type GlogSink struct { }
GlogSink is the most basic sink Useful when you already have ELK/EFK Stack
type HTTPSink ¶
type HTTPSink struct { SinkURL string // contains filtered or unexported fields }
HTTPSink wraps an HTTP endpoint that messages should be sent to.
func NewHTTPSink ¶
NewHTTPSink constructs a new HTTPSink given a sink URL and buffer size
func (*HTTPSink) Run ¶
Run sits in a loop, waiting for data to come in through h.eventCh, and forwarding them to the HTTP sink. If multiple events have happened between loop iterations, it puts all of them in one request instead of making a single request per event.
func (*HTTPSink) UpdateEvents ¶
UpdateEvents implements the EventSinkInterface. It really just writes the event data to the event OverflowingChannel, which should never block. Messages that are buffered beyond the bufferSize specified for this HTTPSink are discarded.
type StdoutSink ¶
type StdoutSink struct { }
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