Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ELKType is ELK-required type field ELKType = "type" // ELKTimestamp is a timestamp required by ELK ELKTimestamp = "@timestamp" // ELKEntry is an object with events set by logrus ELKEntry = "entry" // ELKMessage contains user friendly message ELKMessage = "message" // ELKTrace is an object with trace data ELKTrace = "trace" // ELKBeatName is a beat name for ELKHook ELKBeatName = "trace" // ELKBeatVersion is a current version ELKBeatVersion = "0.0.1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ELK ¶
type ELK struct { Clock clockwork.Clock SetupC chan bool // contains filtered or unexported fields }
ELK implements Elasticsearch-compatible logrus hook ELK's template is stored in template.json To initialize this template, use: curl -XPUT 'http://localhost:9200/_template/trace' -d@template.json
func NewELK ¶
func NewELK(opts ...ELKOptionSetter) *ELK
NewELK returns logrus-compatible hook that sends data to ELK
func (*ELK) Config ¶
Config configures ELKHook beat parameters read more about beats here: https://www.elastic.co/guide/en/beats/libbeat/current/new-beat.html#config-method
type ELKOptionSetter ¶
type ELKOptionSetter func(f *ELK)
ELKOptionSetter represents functional arguments passed to ELKHook
Click to show internal directories.
Click to hide internal directories.