configuration.go 632 B

123456789101112131415161718
  1. package configuration
  2. import (
  3. log "github.com/sirupsen/logrus"
  4. )
  5. type DataSourceCommonCfg struct {
  6. Mode string `yaml:"mode,omitempty"`
  7. Labels map[string]string `yaml:"labels,omitempty"`
  8. LogLevel *log.Level `yaml:"log_level,omitempty"`
  9. Source string `yaml:"source,omitempty"`
  10. Name string `yaml:"name,omitempty"`
  11. Config map[string]interface{} `yaml:",inline"` //to keep the datasource-specific configuration directives
  12. }
  13. var TAIL_MODE = "tail"
  14. var CAT_MODE = "cat"
  15. var SERVER_MODE = "server" // No difference with tail, just a bit more verbose