2016-01-27 21:21:36 +00:00
|
|
|
package telegraf
|
|
|
|
|
|
|
|
type Output interface {
|
|
|
|
// Connect to the Output
|
|
|
|
Connect() error
|
|
|
|
// Close any connections to the Output
|
|
|
|
Close() error
|
|
|
|
// Description returns a one-sentence description on the Output
|
|
|
|
Description() string
|
|
|
|
// SampleConfig returns the default configuration of the Output
|
|
|
|
SampleConfig() string
|
|
|
|
// Write takes in group of points to be written to the Output
|
2016-01-27 23:15:14 +00:00
|
|
|
Write(metrics []Metric) error
|
2016-01-27 21:21:36 +00:00
|
|
|
}
|
|
|
|
|
2018-09-05 21:50:32 +00:00
|
|
|
type AggregatingOutput interface {
|
|
|
|
Add(in Metric)
|
|
|
|
Push() []Metric
|
|
|
|
Reset()
|
|
|
|
}
|
|
|
|
|
2016-01-27 21:21:36 +00:00
|
|
|
type ServiceOutput interface {
|
|
|
|
// Connect to the Output
|
|
|
|
Connect() error
|
|
|
|
// Close any connections to the Output
|
|
|
|
Close() error
|
|
|
|
// Description returns a one-sentence description on the Output
|
|
|
|
Description() string
|
|
|
|
// SampleConfig returns the default configuration of the Output
|
|
|
|
SampleConfig() string
|
|
|
|
// Write takes in group of points to be written to the Output
|
2016-01-27 23:15:14 +00:00
|
|
|
Write(metrics []Metric) error
|
2016-01-27 21:21:36 +00:00
|
|
|
// Start the "service" that will provide an Output
|
|
|
|
Start() error
|
|
|
|
// Stop the "service" that will provide an Output
|
|
|
|
Stop()
|
|
|
|
}
|