func (e *Executor) VoidCallback(callback func(context.Context, time.Duration), interval time.Duration) {
	e.cb = append(e.cb, voidCallback{
		callback: callback,
		interval: interval,
		done:     make(chan struct{}),
	})
}
VoidCallback adds a "complex" callback to the Executor. While the functions
prototype is simpler, all the work has to be done by the callback, i.e. the
callback needs to format and print the appropriate lines to "STDOUT".
However, this allows cases in which the number of values reported varies,
e.g. depending on the system the code is running on.
package exec  
import (
	"context"
	"log"
	"os"
	"strconv"
	"sync"
	"time"
	"collectd.org/api"
	"collectd.org/format"
)
var Putval api.Writer = format.NewPutval(os.Stdout)
type callback interface {
	run(context.Context, *sync.WaitGroup)
	stop()
}
type Executor struct {
	cb    []callback
	group sync.WaitGroup
}
func NewExecutor() *Executor {
	return &Executor{
		group: sync.WaitGroup{},
	}
}
func (e *Executor) ValueCallback(callback func() api.Value, vl *api.ValueList) {
	e.cb = append(e.cb, &valueCallback{
		callback: callback,
		vl:       *vl,
		done:     make(chan struct{}),
	})
}