configuration.go 743 B

12345678910111213141516171819
  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. UseTimeMachine bool `yaml:"use_time_machine,omitempty"`
  12. Config map[string]interface{} `yaml:",inline"` //to keep the datasource-specific configuration directives
  13. }
  14. var TAIL_MODE = "tail"
  15. var CAT_MODE = "cat"
  16. var SERVER_MODE = "server" // No difference with tail, just a bit more verbose