Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventMiddleware ¶
EventMiddleware is a type alias for easier middleware construction
type EventWriter ¶
type EventWriter struct {
// contains filtered or unexported fields
}
EventWriter is structure that satisfies the io.Writer interface. Its objective is to interpret written bytes and form them into events that can be recorded to the provided Recorder. EventWriter supports the concept of middleware, which enables some transformations to occur to the raw event.
func NewEventWriter ¶
func NewEventWriter(rec recorders.Recorder, eventType common.EventType, middleware ...EventMiddleware) EventWriter
NewEventWriter is a constructor for an EventWriter
type RawEvent ¶
type RawEvent struct { Data []byte EventTime time.Time EventType common.EventType Error error // contains filtered or unexported fields }
RawEvent is a structure that can be sent to middleware to review/modify. The fields included are the basic components of an event, unmodified (specifically, Data, EventType, EventTime) TODO: should these be replaced with common.Event?
func (RawEvent) Dispatch ¶
func (evt RawEvent) Dispatch()
Dispatch provides a mechanism to send the event off to its Recorder. This is present so that a caching mechanism can be enabled, or alternatively, allowing some middleware to dispatch an event so that other middleware cannot inspect it (if such a feature is needed)