Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Opts struct { ConfFile string `` /* 129-byte string literal not displayed */ Reader string `long:"reader" env:"READER" default:"localhost:1234/debug/vars" description:"Target address and port"` Recorder string `long:"recorder" env:"RECORDER" default:"localhost:9200" description:"Elasticsearch URL and port"` LogLevel string `long:"loglevel" env:"LOGLEVEL" default:"info" description:"Log level"` IndexName string `long:"index" env:"INDEX" default:"expipe" description:"Elasticsearch index name"` TypeName string `long:"type" env:"TYPE" default:"expipe" description:"Elasticsearch type name"` Interval time.Duration `long:"int" env:"INT" default:"1s" description:"Interval between pulls from the target"` Timeout time.Duration `long:"timeout" env:"TIMEOUT" default:"30s" description:"Communication time-outs to both reader and recorder"` Backoff int `long:"backoff" env:"BACKOFF" default:"15" description:"After this amount, it will give up accessing unresponsive endpoints"` }
Opts is the command line flag struct. IDEA: create an interactive wizard for creating a config file.
Functions ¶
func CaptureSignals ¶
func CaptureSignals(cancel context.CancelFunc, sigCh chan os.Signal, exit func(int), timeout time.Duration)
CaptureSignals cancels the context if receives the SIGINT or SIGTERM signal through sigCh, and exits with calling exit(130).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.