forked from influxdata/telegraf
-
Notifications
You must be signed in to change notification settings - Fork 1
/
input.go
31 lines (24 loc) · 827 Bytes
/
input.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package telegraf
type Input interface {
PluginDescriber
// Gather takes in an accumulator and adds the metrics that the Input
// gathers. This is called every agent.interval
Gather(Accumulator) error
}
type ServiceInput interface {
Input
// Start the ServiceInput. The Accumulator may be retained and used until
// Stop returns.
Start(Accumulator) error
// Stop stops the services and closes any necessary channels and connections.
// Metrics should not be written out to the accumulator once stop returns, so
// Stop() should stop reading and wait for any in-flight metrics to write out
// to the accumulator before returning.
Stop()
}
type HighPriorityInput interface {
Input
// MarkHighPriority does nothing but tell us this input plugin may be a high
// priority input plugin.
MarkHighPriority()
}