Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventSink ¶
type EventSink interface {
Receive(keyvals ...interface{}) error
}
EventSink interface
type HTTPEvent ¶
type HTTPEvent struct { Timestamp time.Time `json:"timestamp"` Message map[string]interface{} `json:"message"` }
HTTPEvent represents an arbitrary key-value event
type HTTPEventSink ¶
type HTTPEventSink struct {
// contains filtered or unexported fields
}
HTTPEventSink pushes arbitrary key-value events to an external location
func NewHTTPSink ¶
func NewHTTPSink(host string, path string, method string) HTTPEventSink
NewHTTPSink initializes and returns an HTTPEventSink
func (*HTTPEventSink) Receive ¶
func (httpsink *HTTPEventSink) Receive(keyvals ...interface{}) error
Receive consumes an arbitrary set of keys and values (k1,v1,k2,v2,...), constructs an HTTPEvent from them, and sends them to the configured http endpoint using the configured method
type LocalEventSink ¶
type LocalEventSink struct {
// contains filtered or unexported fields
}
LocalEventSink - an implementation of EventSink that simply logs events to os.Stderr.
func (*LocalEventSink) Receive ¶
func (localSink *LocalEventSink) Receive(keyvals ...interface{}) error
Receive Log events.
Click to show internal directories.
Click to hide internal directories.