2016-02-03 09:27:22 +00:00
|
|
|
package tail
|
|
|
|
|
|
|
|
import "github.com/influxdata/telegraf/internal/encoding/graphite"
|
|
|
|
|
|
|
|
// Config represents the configuration for Graphite endpoints.
|
|
|
|
type Config struct {
|
|
|
|
Files []string
|
|
|
|
|
2016-02-03 15:47:55 +00:00
|
|
|
graphite.Config
|
2016-02-03 09:27:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// New Config instance.
|
2016-02-04 06:02:47 +00:00
|
|
|
func NewConfig(files []string, separator string, templates []string) *Config {
|
2016-02-03 09:27:22 +00:00
|
|
|
c := &Config{}
|
2016-02-04 06:02:47 +00:00
|
|
|
if separator == "" {
|
|
|
|
separator = graphite.DefaultSeparator
|
|
|
|
}
|
|
|
|
|
2016-02-03 09:27:22 +00:00
|
|
|
c.Files = files
|
|
|
|
c.Templates = templates
|
2016-02-04 06:02:47 +00:00
|
|
|
c.Separator = separator
|
2016-02-03 09:27:22 +00:00
|
|
|
|
|
|
|
return c
|
|
|
|
}
|