github.com/influxdata/telegraf@v1.30.3/aggregator.go (about)

     1  package telegraf
     2  
     3  // Aggregator is an interface for implementing an Aggregator plugin.
     4  // the RunningAggregator wraps this interface and guarantees that
     5  // Add, Push, and Reset can not be called concurrently, so locking is not
     6  // required when implementing an Aggregator plugin.
     7  type Aggregator interface {
     8  	PluginDescriber
     9  
    10  	// Add the metric to the aggregator.
    11  	Add(in Metric)
    12  
    13  	// Push pushes the current aggregates to the accumulator.
    14  	Push(acc Accumulator)
    15  
    16  	// Reset resets the aggregators caches and aggregates.
    17  	Reset()
    18  }