@@ -44,13 +44,13 @@ func (e *DataSourceUnavailableError) Unwrap() error {
44
44
type DataSource interface {
45
45
GetMetrics () []prometheus.Collector // Returns pointers to metrics that are managed by the module
46
46
GetAggregMetrics () []prometheus.Collector // Returns pointers to metrics that are managed by the module (aggregated mode, limits cardinality)
47
- UnmarshalConfig ([]byte ) error // Decode and pre-validate the YAML datasource - anything that can be checked before runtime
48
- Configure ([]byte , * log.Entry , int ) error // Complete the YAML datasource configuration and perform runtime checks.
49
- ConfigureByDSN (string , map [string ]string , * log.Entry , string ) error // Configure the datasource
47
+ UnmarshalConfig (yamlConfig []byte ) error // Decode and pre-validate the YAML datasource - anything that can be checked before runtime
48
+ Configure (yamlConfig []byte , logger * log.Entry , metricsLevel int ) error // Complete the YAML datasource configuration and perform runtime checks.
49
+ ConfigureByDSN (dsn string , labels map [string ]string , logger * log.Entry , uniqueID string ) error // Configure the datasource
50
50
GetMode () string // Get the mode (TAIL, CAT or SERVER)
51
51
GetName () string // Get the name of the module
52
- OneShotAcquisition (context.Context , chan types.Event , * tomb.Tomb ) error // Start one shot acquisition(eg, cat a file)
53
- StreamingAcquisition (context.Context , chan types.Event , * tomb.Tomb ) error // Start live acquisition (eg, tail a file)
52
+ OneShotAcquisition (ctx context.Context , out chan types.Event , acquisTomb * tomb.Tomb ) error // Start one shot acquisition(eg, cat a file)
53
+ StreamingAcquisition (ctx context.Context , out chan types.Event , acquisTomb * tomb.Tomb ) error // Start live acquisition (eg, tail a file)
54
54
CanRun () error // Whether the datasource can run or not (eg, journalctl on BSD is a non-sense)
55
55
GetUuid () string // Get the unique identifier of the datasource
56
56
Dump () interface {}
0 commit comments