func GetAggregator(label string) (Aggregator, error) {
	switch label {
	case "min":
		return &AggregatorMin{}, nil
	case "max":
		return &AggregatorMax{}, nil
	case "avg":
		return &AggregatorAvg{}, nil
	default:
		return nil, fmt.Errorf("invalid aggregation specifier")
	}
}
GetConstantSpaceAggr translates a label into a new ConstantSpaceAggr.
package main
import "fmt"
type Aggregator interface {
	Put(float64)
	Get() float64
}
type AggregatorMax struct {
	value float64
	count int64
}
func (a *AggregatorMax) Put(n float64) {
	if n > a.value || a.count == 0 {
		a.value = n
	}
	a.count++
}
func (a *AggregatorMax) Get() float64 {
	if a.count == 0 {
		return 0
	}
	return a.value
}
type AggregatorMin struct {
	value float64
	count int64
}
func (a *AggregatorMin) Put(n float64) {
	if n < a.value || a.count == 0 {
		a.value = n
	}
	a.count++
}
func (a *AggregatorMin) Get() float64 {
	return a.value
}
type AggregatorAvg struct {
	value float64
	count int64
}
func (a *AggregatorAvg) Put(n float64) {
	a.value += n
	a.count++
}
func (a *AggregatorAvg) Get() float64 {
	if a.count == 0 {
		return 0
	}
	return a.value / float64(a.count)
}