github.com/crowdsecurity/crowdsec@v1.6.1/pkg/acquisition/configuration/configuration.go (about) 1 package configuration 2 3 import ( 4 log "github.com/sirupsen/logrus" 5 ) 6 7 type DataSourceCommonCfg struct { 8 Mode string `yaml:"mode,omitempty"` 9 Labels map[string]string `yaml:"labels,omitempty"` 10 LogLevel *log.Level `yaml:"log_level,omitempty"` 11 Source string `yaml:"source,omitempty"` 12 Name string `yaml:"name,omitempty"` 13 UseTimeMachine bool `yaml:"use_time_machine,omitempty"` 14 UniqueId string `yaml:"unique_id,omitempty"` 15 TransformExpr string `yaml:"transform,omitempty"` 16 Config map[string]interface{} `yaml:",inline"` //to keep the datasource-specific configuration directives 17 } 18 19 var TAIL_MODE = "tail" 20 var CAT_MODE = "cat" 21 var SERVER_MODE = "server" // No difference with tail, just a bit more verbose 22 23 const ( 24 METRICS_NONE = iota 25 METRICS_AGGREGATE 26 METRICS_FULL 27 ) 28 29 const ( 30 CFG_METRICS_AGGREGATE = "aggregated" 31 CFG_METRICS_FULL = "full" 32 )