Example #1
0
func (l *ProcfsInput) Run(output chan common.MapStr) error {
	logp.Debug("[procfsinput]", "Starting up Procfs Input")

	go inputs.PeriodicTaskRunner(l, output, runTick, runMinor, runMajor)

	return nil
}
Example #2
0
func (l *PackagesInput) Run(output chan common.MapStr) error {
	logp.Debug("[PackagesInput]", "Running Packages Input")

	// dispatch thread here
	go inputs.PeriodicTaskRunner(l, output, l.doStuff, inputs.EmptyFunc, inputs.EmptyFunc)

	return nil
}
Example #3
0
// If you had a periodic type input, use the below as the "Run" method instead of the above "Run"
func (l *NullInput) RunPeriodic(output chan common.MapStr) error {
	logp.Debug("[nullinput]", "Starting up Null Input")

	// use the runTick for tick interval, empty functions for minor and major
	go inputs.PeriodicTaskRunner(l, output, l.doStuff, inputs.EmptyFunc, inputs.EmptyFunc)

	return nil
}