func (a *Agent) Close() error {
	var err error
	for _, o := range a.Config.Outputs {
		err = o.Output.Close()
		switch ot := o.Output.(type) {
		case telegraf.ServiceOutput:
			ot.Stop()
		}
	}
	return err
}
// Close closes the connection to all configured outputs
Close closes the connection to all configured outputs
// Close closes the connection to all configured outputs
func (a *Agent) Close() error {
	var err error
	for _, o := range a.Config.Outputs {
		err = o.Output.Close()
		switch ot := o.Output.(type) {
		case telegraf.ServiceOutput:
			ot.Stop()
		}
	}
	return err
}
func ( a * Agent ) Close ( ) error { var err error for _ , o := range a . Config . Outputs { err = o . Output . Close ( ) switch ot := o . Output . ( type ) { case telegraf . ServiceOutput : ot . Stop ( ) } } return err }
Close closes the connection to all configured outputs
Close closes the connection to all configured outputs