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 }
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 }
// 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 }